ruby_smb 1.0.3 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.travis.yml +3 -2
  5. data/Gemfile +6 -2
  6. data/README.md +35 -47
  7. data/examples/enum_registry_key.rb +28 -0
  8. data/examples/enum_registry_values.rb +30 -0
  9. data/examples/negotiate.rb +51 -8
  10. data/examples/pipes.rb +2 -1
  11. data/examples/read_file_encryption.rb +56 -0
  12. data/examples/read_registry_key_value.rb +32 -0
  13. data/lib/ruby_smb.rb +4 -1
  14. data/lib/ruby_smb/client.rb +233 -22
  15. data/lib/ruby_smb/client/authentication.rb +70 -33
  16. data/lib/ruby_smb/client/echo.rb +20 -2
  17. data/lib/ruby_smb/client/encryption.rb +62 -0
  18. data/lib/ruby_smb/client/negotiation.rb +172 -24
  19. data/lib/ruby_smb/client/signing.rb +19 -0
  20. data/lib/ruby_smb/client/tree_connect.rb +24 -18
  21. data/lib/ruby_smb/client/utils.rb +8 -7
  22. data/lib/ruby_smb/client/winreg.rb +46 -0
  23. data/lib/ruby_smb/crypto.rb +30 -0
  24. data/lib/ruby_smb/dcerpc.rb +38 -0
  25. data/lib/ruby_smb/dcerpc/bind.rb +2 -2
  26. data/lib/ruby_smb/dcerpc/bind_ack.rb +2 -2
  27. data/lib/ruby_smb/dcerpc/error.rb +3 -0
  28. data/lib/ruby_smb/dcerpc/ndr.rb +95 -16
  29. data/lib/ruby_smb/dcerpc/pdu_header.rb +1 -1
  30. data/lib/ruby_smb/dcerpc/request.rb +28 -9
  31. data/lib/ruby_smb/dcerpc/rrp_unicode_string.rb +35 -0
  32. data/lib/ruby_smb/dcerpc/srvsvc.rb +10 -0
  33. data/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all.rb +9 -0
  34. data/lib/ruby_smb/dcerpc/winreg.rb +340 -0
  35. data/lib/ruby_smb/dcerpc/winreg/close_key_request.rb +24 -0
  36. data/lib/ruby_smb/dcerpc/winreg/close_key_response.rb +27 -0
  37. data/lib/ruby_smb/dcerpc/winreg/enum_key_request.rb +45 -0
  38. data/lib/ruby_smb/dcerpc/winreg/enum_key_response.rb +42 -0
  39. data/lib/ruby_smb/dcerpc/winreg/enum_value_request.rb +39 -0
  40. data/lib/ruby_smb/dcerpc/winreg/enum_value_response.rb +36 -0
  41. data/lib/ruby_smb/dcerpc/winreg/open_key_request.rb +34 -0
  42. data/lib/ruby_smb/dcerpc/winreg/open_key_response.rb +25 -0
  43. data/lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb +43 -0
  44. data/lib/ruby_smb/dcerpc/winreg/open_root_key_response.rb +35 -0
  45. data/lib/ruby_smb/dcerpc/winreg/query_info_key_request.rb +27 -0
  46. data/lib/ruby_smb/dcerpc/winreg/query_info_key_response.rb +40 -0
  47. data/lib/ruby_smb/dcerpc/winreg/query_value_request.rb +39 -0
  48. data/lib/ruby_smb/dcerpc/winreg/query_value_response.rb +57 -0
  49. data/lib/ruby_smb/dcerpc/winreg/regsam.rb +40 -0
  50. data/lib/ruby_smb/dispatcher/socket.rb +4 -3
  51. data/lib/ruby_smb/error.rb +68 -2
  52. data/lib/ruby_smb/generic_packet.rb +33 -4
  53. data/lib/ruby_smb/smb1/commands.rb +1 -1
  54. data/lib/ruby_smb/smb1/file.rb +66 -15
  55. data/lib/ruby_smb/smb1/packet/close_request.rb +2 -5
  56. data/lib/ruby_smb/smb1/packet/close_response.rb +2 -1
  57. data/lib/ruby_smb/smb1/packet/echo_request.rb +2 -4
  58. data/lib/ruby_smb/smb1/packet/echo_response.rb +2 -1
  59. data/lib/ruby_smb/smb1/packet/empty_packet.rb +10 -1
  60. data/lib/ruby_smb/smb1/packet/logoff_request.rb +2 -4
  61. data/lib/ruby_smb/smb1/packet/logoff_response.rb +2 -1
  62. data/lib/ruby_smb/smb1/packet/negotiate_request.rb +2 -5
  63. data/lib/ruby_smb/smb1/packet/negotiate_response.rb +3 -7
  64. data/lib/ruby_smb/smb1/packet/negotiate_response_extended.rb +4 -4
  65. data/lib/ruby_smb/smb1/packet/nt_create_andx_request.rb +2 -4
  66. data/lib/ruby_smb/smb1/packet/nt_create_andx_response.rb +2 -1
  67. data/lib/ruby_smb/smb1/packet/nt_trans/create_request.rb +2 -1
  68. data/lib/ruby_smb/smb1/packet/nt_trans/create_response.rb +2 -1
  69. data/lib/ruby_smb/smb1/packet/nt_trans/request.rb +2 -4
  70. data/lib/ruby_smb/smb1/packet/nt_trans/response.rb +2 -1
  71. data/lib/ruby_smb/smb1/packet/read_andx_request.rb +2 -5
  72. data/lib/ruby_smb/smb1/packet/read_andx_response.rb +2 -1
  73. data/lib/ruby_smb/smb1/packet/session_setup_legacy_request.rb +2 -1
  74. data/lib/ruby_smb/smb1/packet/session_setup_legacy_response.rb +3 -2
  75. data/lib/ruby_smb/smb1/packet/session_setup_request.rb +2 -5
  76. data/lib/ruby_smb/smb1/packet/session_setup_response.rb +3 -2
  77. data/lib/ruby_smb/smb1/packet/trans/peek_nmpipe_request.rb +0 -1
  78. data/lib/ruby_smb/smb1/packet/trans/peek_nmpipe_response.rb +3 -2
  79. data/lib/ruby_smb/smb1/packet/trans/request.rb +2 -5
  80. data/lib/ruby_smb/smb1/packet/trans/response.rb +2 -1
  81. data/lib/ruby_smb/smb1/packet/trans/transact_nmpipe_request.rb +1 -1
  82. data/lib/ruby_smb/smb1/packet/trans/transact_nmpipe_response.rb +1 -1
  83. data/lib/ruby_smb/smb1/packet/trans2/find_first2_request.rb +2 -1
  84. data/lib/ruby_smb/smb1/packet/trans2/find_first2_response.rb +8 -2
  85. data/lib/ruby_smb/smb1/packet/trans2/find_next2_request.rb +2 -1
  86. data/lib/ruby_smb/smb1/packet/trans2/find_next2_response.rb +8 -2
  87. data/lib/ruby_smb/smb1/packet/trans2/open2_request.rb +2 -1
  88. data/lib/ruby_smb/smb1/packet/trans2/open2_response.rb +2 -1
  89. data/lib/ruby_smb/smb1/packet/trans2/request.rb +2 -4
  90. data/lib/ruby_smb/smb1/packet/trans2/request_secondary.rb +2 -4
  91. data/lib/ruby_smb/smb1/packet/trans2/response.rb +2 -1
  92. data/lib/ruby_smb/smb1/packet/trans2/set_file_information_request.rb +2 -1
  93. data/lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb +2 -1
  94. data/lib/ruby_smb/smb1/packet/tree_connect_request.rb +2 -4
  95. data/lib/ruby_smb/smb1/packet/tree_connect_response.rb +13 -3
  96. data/lib/ruby_smb/smb1/packet/tree_disconnect_request.rb +2 -4
  97. data/lib/ruby_smb/smb1/packet/tree_disconnect_response.rb +2 -1
  98. data/lib/ruby_smb/smb1/packet/write_andx_request.rb +3 -6
  99. data/lib/ruby_smb/smb1/packet/write_andx_response.rb +2 -1
  100. data/lib/ruby_smb/smb1/pipe.rb +87 -6
  101. data/lib/ruby_smb/smb1/tree.rb +50 -3
  102. data/lib/ruby_smb/smb2/bit_field/session_flags.rb +2 -1
  103. data/lib/ruby_smb/smb2/bit_field/share_flags.rb +6 -4
  104. data/lib/ruby_smb/smb2/file.rb +103 -25
  105. data/lib/ruby_smb/smb2/negotiate_context.rb +108 -0
  106. data/lib/ruby_smb/smb2/packet.rb +2 -0
  107. data/lib/ruby_smb/smb2/packet/close_request.rb +2 -4
  108. data/lib/ruby_smb/smb2/packet/close_response.rb +2 -1
  109. data/lib/ruby_smb/smb2/packet/compression_transform_header.rb +41 -0
  110. data/lib/ruby_smb/smb2/packet/create_request.rb +2 -4
  111. data/lib/ruby_smb/smb2/packet/create_response.rb +2 -1
  112. data/lib/ruby_smb/smb2/packet/echo_request.rb +2 -4
  113. data/lib/ruby_smb/smb2/packet/echo_response.rb +2 -1
  114. data/lib/ruby_smb/smb2/packet/error_packet.rb +15 -3
  115. data/lib/ruby_smb/smb2/packet/ioctl_request.rb +2 -5
  116. data/lib/ruby_smb/smb2/packet/ioctl_response.rb +2 -1
  117. data/lib/ruby_smb/smb2/packet/logoff_request.rb +2 -4
  118. data/lib/ruby_smb/smb2/packet/logoff_response.rb +2 -1
  119. data/lib/ruby_smb/smb2/packet/negotiate_request.rb +51 -17
  120. data/lib/ruby_smb/smb2/packet/negotiate_response.rb +52 -5
  121. data/lib/ruby_smb/smb2/packet/query_directory_request.rb +2 -4
  122. data/lib/ruby_smb/smb2/packet/query_directory_response.rb +8 -2
  123. data/lib/ruby_smb/smb2/packet/read_request.rb +2 -4
  124. data/lib/ruby_smb/smb2/packet/read_response.rb +2 -1
  125. data/lib/ruby_smb/smb2/packet/session_setup_request.rb +2 -5
  126. data/lib/ruby_smb/smb2/packet/session_setup_response.rb +2 -1
  127. data/lib/ruby_smb/smb2/packet/set_info_request.rb +2 -4
  128. data/lib/ruby_smb/smb2/packet/set_info_response.rb +2 -1
  129. data/lib/ruby_smb/smb2/packet/transform_header.rb +84 -0
  130. data/lib/ruby_smb/smb2/packet/tree_connect_request.rb +93 -10
  131. data/lib/ruby_smb/smb2/packet/tree_connect_response.rb +10 -22
  132. data/lib/ruby_smb/smb2/packet/tree_disconnect_request.rb +2 -4
  133. data/lib/ruby_smb/smb2/packet/tree_disconnect_response.rb +2 -1
  134. data/lib/ruby_smb/smb2/packet/write_request.rb +2 -4
  135. data/lib/ruby_smb/smb2/packet/write_response.rb +2 -1
  136. data/lib/ruby_smb/smb2/pipe.rb +86 -12
  137. data/lib/ruby_smb/smb2/smb2_header.rb +1 -1
  138. data/lib/ruby_smb/smb2/tree.rb +65 -21
  139. data/lib/ruby_smb/version.rb +1 -1
  140. data/ruby_smb.gemspec +5 -3
  141. data/spec/lib/ruby_smb/client_spec.rb +1612 -108
  142. data/spec/lib/ruby_smb/crypto_spec.rb +25 -0
  143. data/spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb +2 -2
  144. data/spec/lib/ruby_smb/dcerpc/bind_spec.rb +2 -2
  145. data/spec/lib/ruby_smb/dcerpc/ndr_spec.rb +410 -0
  146. data/spec/lib/ruby_smb/dcerpc/request_spec.rb +50 -7
  147. data/spec/lib/ruby_smb/dcerpc/rrp_unicode_string_spec.rb +98 -0
  148. data/spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb +13 -0
  149. data/spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb +60 -0
  150. data/spec/lib/ruby_smb/dcerpc/winreg/close_key_request_spec.rb +28 -0
  151. data/spec/lib/ruby_smb/dcerpc/winreg/close_key_response_spec.rb +36 -0
  152. data/spec/lib/ruby_smb/dcerpc/winreg/enum_key_request_spec.rb +108 -0
  153. data/spec/lib/ruby_smb/dcerpc/winreg/enum_key_response_spec.rb +97 -0
  154. data/spec/lib/ruby_smb/dcerpc/winreg/enum_value_request_spec.rb +94 -0
  155. data/spec/lib/ruby_smb/dcerpc/winreg/enum_value_response_spec.rb +82 -0
  156. data/spec/lib/ruby_smb/dcerpc/winreg/open_key_request_spec.rb +74 -0
  157. data/spec/lib/ruby_smb/dcerpc/winreg/open_key_response_spec.rb +35 -0
  158. data/spec/lib/ruby_smb/dcerpc/winreg/open_root_key_request_spec.rb +90 -0
  159. data/spec/lib/ruby_smb/dcerpc/winreg/open_root_key_response_spec.rb +38 -0
  160. data/spec/lib/ruby_smb/dcerpc/winreg/query_info_key_request_spec.rb +39 -0
  161. data/spec/lib/ruby_smb/dcerpc/winreg/query_info_key_response_spec.rb +113 -0
  162. data/spec/lib/ruby_smb/dcerpc/winreg/query_value_request_spec.rb +88 -0
  163. data/spec/lib/ruby_smb/dcerpc/winreg/query_value_response_spec.rb +150 -0
  164. data/spec/lib/ruby_smb/dcerpc/winreg/regsam_spec.rb +32 -0
  165. data/spec/lib/ruby_smb/dcerpc/winreg_spec.rb +710 -0
  166. data/spec/lib/ruby_smb/dcerpc_spec.rb +81 -0
  167. data/spec/lib/ruby_smb/dispatcher/socket_spec.rb +2 -2
  168. data/spec/lib/ruby_smb/error_spec.rb +59 -0
  169. data/spec/lib/ruby_smb/generic_packet_spec.rb +52 -4
  170. data/spec/lib/ruby_smb/smb1/file_spec.rb +191 -2
  171. data/spec/lib/ruby_smb/smb1/packet/empty_packet_spec.rb +68 -0
  172. data/spec/lib/ruby_smb/smb1/packet/session_setup_legacy_request_spec.rb +2 -2
  173. data/spec/lib/ruby_smb/smb1/packet/session_setup_legacy_response_spec.rb +2 -2
  174. data/spec/lib/ruby_smb/smb1/packet/session_setup_request_spec.rb +2 -2
  175. data/spec/lib/ruby_smb/smb1/packet/session_setup_response_spec.rb +1 -1
  176. data/spec/lib/ruby_smb/smb1/packet/trans2/find_first2_response_spec.rb +11 -2
  177. data/spec/lib/ruby_smb/smb1/packet/trans2/find_next2_response_spec.rb +11 -2
  178. data/spec/lib/ruby_smb/smb1/packet/tree_connect_response_spec.rb +40 -0
  179. data/spec/lib/ruby_smb/smb1/pipe_spec.rb +272 -149
  180. data/spec/lib/ruby_smb/smb1/tree_spec.rb +44 -7
  181. data/spec/lib/ruby_smb/smb2/bit_field/session_flags_spec.rb +9 -0
  182. data/spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb +27 -0
  183. data/spec/lib/ruby_smb/smb2/file_spec.rb +323 -6
  184. data/spec/lib/ruby_smb/smb2/negotiate_context_spec.rb +332 -0
  185. data/spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb +108 -0
  186. data/spec/lib/ruby_smb/smb2/packet/error_packet_spec.rb +78 -0
  187. data/spec/lib/ruby_smb/smb2/packet/negotiate_request_spec.rb +138 -3
  188. data/spec/lib/ruby_smb/smb2/packet/negotiate_response_spec.rb +120 -2
  189. data/spec/lib/ruby_smb/smb2/packet/query_directory_response_spec.rb +8 -0
  190. data/spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb +220 -0
  191. data/spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb +339 -9
  192. data/spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb +3 -22
  193. data/spec/lib/ruby_smb/smb2/pipe_spec.rb +286 -149
  194. data/spec/lib/ruby_smb/smb2/smb2_header_spec.rb +2 -2
  195. data/spec/lib/ruby_smb/smb2/tree_spec.rb +261 -2
  196. metadata +191 -83
  197. metadata.gz.sig +0 -0
  198. data/lib/ruby_smb/smb1/dcerpc.rb +0 -67
  199. data/lib/ruby_smb/smb2/dcerpc.rb +0 -70
  200. data/spec/lib/ruby_smb/smb1/packet/error_packet_spec.rb +0 -37
@@ -44,8 +44,8 @@ RSpec.describe RubySMB::SMB2::SMB2Header do
44
44
  expect(header.credit_charge).to be_a BinData::Uint16le
45
45
  end
46
46
 
47
- it 'has a default value of 0' do
48
- expect(header.credit_charge).to eq 0
47
+ it 'has a default value of 1' do
48
+ expect(header.credit_charge).to eq 1
49
49
  end
50
50
  end
51
51
 
@@ -26,6 +26,7 @@ RSpec.describe RubySMB::SMB2::Tree do
26
26
  it { is_expected.to respond_to :permissions }
27
27
  it { is_expected.to respond_to :share }
28
28
  it { is_expected.to respond_to :id }
29
+ it { is_expected.to respond_to :tree_connect_encrypt_data }
29
30
 
30
31
  it 'inherits the client that spawned it' do
31
32
  expect(tree.client).to eq client
@@ -44,10 +45,24 @@ RSpec.describe RubySMB::SMB2::Tree do
44
45
  allow(RubySMB::SMB2::Packet::TreeDisconnectRequest).to receive(:new).and_return(disco_req)
45
46
  modified_req = disco_req
46
47
  modified_req.smb2_header.tree_id = tree.id
47
- expect(client).to receive(:send_recv).with(modified_req).and_return(disco_resp.to_binary_s)
48
+ expect(client).to receive(:send_recv).with(modified_req, encrypt: false).and_return(disco_resp.to_binary_s)
48
49
  tree.disconnect!
49
50
  end
50
51
 
52
+ it 'calls Client #send_recv with encryption set if required' do
53
+ allow(tree).to receive(:set_header_fields).and_return(disco_req)
54
+ tree.tree_connect_encrypt_data = true
55
+ expect(client).to receive(:send_recv).with(disco_req, encrypt: true).and_return(disco_resp.to_binary_s)
56
+ tree.disconnect!
57
+ end
58
+
59
+ it 'raises an InvalidPacket exception if the response is not valid' do
60
+ allow(client).to receive(:send_recv)
61
+ allow(RubySMB::SMB2::Packet::TreeDisconnectResponse).to receive(:read).and_return(disco_resp)
62
+ allow(disco_resp).to receive(:valid?).and_return(false)
63
+ expect { tree.disconnect! }.to raise_error(RubySMB::Error::InvalidPacket)
64
+ end
65
+
51
66
  it 'returns the NTStatus code from the response' do
52
67
  allow(client).to receive(:send_recv).and_return(disco_resp.to_binary_s)
53
68
  expect(tree.disconnect!).to eq disco_resp.status_code
@@ -126,9 +141,25 @@ RSpec.describe RubySMB::SMB2::Tree do
126
141
 
127
142
  it 'sends the create request packet and gets a response back' do
128
143
  allow(tree).to receive(:open_directory_packet).and_return(create_req)
129
- expect(client).to receive(:send_recv).with(create_req).and_return(create_response.to_binary_s)
144
+ expect(client).to receive(:send_recv).with(create_req, encrypt: false).and_return(create_response.to_binary_s)
145
+ tree.open_directory
146
+ end
147
+
148
+ it 'calls Client #send_recv with encryption set if required' do
149
+ allow(tree).to receive(:open_directory_packet).and_return(create_req)
150
+ tree.tree_connect_encrypt_data = true
151
+ expect(client).to receive(:send_recv).with(create_req, encrypt: true).and_return(create_response.to_binary_s)
130
152
  tree.open_directory
131
153
  end
154
+
155
+ context 'when the response is not a valid packet' do
156
+ it 'raises an InvalidPacket exception' do
157
+ allow(client).to receive(:send_recv)
158
+ allow(RubySMB::SMB2::Packet::CreateResponse).to receive(:read).and_return(create_response)
159
+ create_response.smb2_header.command = RubySMB::SMB2::Commands::LOGOFF
160
+ expect { tree.open_directory }.to raise_error(RubySMB::Error::InvalidPacket)
161
+ end
162
+ end
132
163
  end
133
164
 
134
165
  describe '#list' do
@@ -190,6 +221,19 @@ RSpec.describe RubySMB::SMB2::Tree do
190
221
  tree.list
191
222
  end
192
223
 
224
+ it 'sends the expected packet and reads the response' do
225
+ allow(tree).to receive(:set_header_fields).and_return(query_dir_req)
226
+ expect(client).to receive(:send_recv).with(query_dir_req, encrypt: false)
227
+ tree.list
228
+ end
229
+
230
+ it 'calls Client #send_recv with encryption set if required' do
231
+ allow(tree).to receive(:set_header_fields).and_return(query_dir_req)
232
+ tree.tree_connect_encrypt_data = true
233
+ expect(client).to receive(:send_recv).with(query_dir_req, encrypt: true)
234
+ tree.list
235
+ end
236
+
193
237
  let(:file1) { double('file information') }
194
238
  let(:file2) { double('file information') }
195
239
 
@@ -202,6 +246,13 @@ RSpec.describe RubySMB::SMB2::Tree do
202
246
  expect(tree.list).to eq([file1])
203
247
  end
204
248
 
249
+ context 'when the response is not a valid packet' do
250
+ it 'raises an InvalidPacket exception' do
251
+ query_dir_res.smb2_header.command = RubySMB::SMB2::Commands::LOGOFF
252
+ expect { tree.list }.to raise_error(RubySMB::Error::InvalidPacket)
253
+ end
254
+ end
255
+
205
256
  context 'when multiple requests are needed to retrieve the full directory list' do
206
257
  before :example do
207
258
  query_dir_res.smb2_header.nt_status = WindowsError::NTStatus::STATUS_SUCCESS.value
@@ -238,4 +289,212 @@ RSpec.describe RubySMB::SMB2::Tree do
238
289
  end
239
290
 
240
291
  end
292
+
293
+ describe '#open_file' do
294
+ let(:create_request) { RubySMB::SMB2::Packet::CreateRequest.new }
295
+ let(:create_response) { RubySMB::SMB2::Packet::CreateResponse.new }
296
+ let(:filename) { "test_file\x00".encode('UTF-16LE') }
297
+
298
+ before :each do
299
+ allow(RubySMB::SMB2::Packet::CreateRequest).to receive(:new).and_return(create_request)
300
+ allow(RubySMB::SMB2::Packet::CreateResponse).to receive(:read).and_return(create_response)
301
+ end
302
+
303
+ it 'calls #set_header_fields' do
304
+ allow(client).to receive(:send_recv).and_return(create_response.to_binary_s)
305
+ expect(tree).to receive(:set_header_fields).with(create_request).and_call_original
306
+ tree.open_file(filename: filename)
307
+ end
308
+
309
+ describe 'filename' do
310
+ it 'takes the filename as an argument' do
311
+ allow(client).to receive(:send_recv) do |packet|
312
+ expect(packet.name).to eq(filename)
313
+ create_response.to_binary_s
314
+ end
315
+ tree.open_file(filename: filename)
316
+ end
317
+ end
318
+
319
+ describe 'attributes' do
320
+ it 'has the correct default fields set' do
321
+ allow(client).to receive(:send_recv) do |packet|
322
+ expect(packet.file_attributes.directory).to eq(0)
323
+ expect(packet.file_attributes.normal).to eq(1)
324
+ create_response.to_binary_s
325
+ end
326
+ tree.open_file(filename: filename)
327
+ end
328
+
329
+ it 'can take the Attributes as an argument' do
330
+ attributes = { normal: 0 }
331
+ allow(client).to receive(:send_recv) do |packet|
332
+ expect(packet.file_attributes.normal).to eq(0)
333
+ create_response.to_binary_s
334
+ end
335
+ tree.open_file(filename: filename, attributes: attributes)
336
+ end
337
+ end
338
+
339
+ describe 'options' do
340
+ it 'has the correct default fields set' do
341
+ allow(client).to receive(:send_recv) do |packet|
342
+ expect(packet.create_options.directory_file).to eq(0)
343
+ expect(packet.create_options.non_directory_file).to eq(1)
344
+ create_response.to_binary_s
345
+ end
346
+ tree.open_file(filename: filename)
347
+ end
348
+
349
+ it 'can take the Create Options as an argument' do
350
+ options = RubySMB::SMB1::BitField::CreateOptions.new(directory_file: 1)
351
+ allow(client).to receive(:send_recv) do |packet|
352
+ expect(packet.create_options.directory_file).to eq(1)
353
+ expect(packet.create_options.non_directory_file).to eq(0)
354
+ create_response.to_binary_s
355
+ end
356
+ tree.open_file(filename: filename, options: options)
357
+ end
358
+ end
359
+
360
+ describe 'disposition' do
361
+ it 'defaults to FILE_OPEN' do
362
+ allow(client).to receive(:send_recv) do |packet|
363
+ expect(packet.create_disposition).to eq(RubySMB::Dispositions::FILE_OPEN)
364
+ create_response.to_binary_s
365
+ end
366
+ tree.open_file(filename: filename)
367
+ end
368
+
369
+ it 'can take the Disposition as an argument' do
370
+ allow(client).to receive(:send_recv) do |packet|
371
+ expect(packet.create_disposition).to eq(RubySMB::Dispositions::FILE_OPEN_IF)
372
+ create_response.to_binary_s
373
+ end
374
+ tree.open_file(filename: filename, disposition: RubySMB::Dispositions::FILE_OPEN_IF)
375
+ end
376
+ end
377
+
378
+ describe 'impersonation level' do
379
+ it 'defaults to SEC_IMPERSONATE' do
380
+ allow(client).to receive(:send_recv) do |packet|
381
+ expect(packet.impersonation_level).to eq(RubySMB::ImpersonationLevels::SEC_IMPERSONATE)
382
+ create_response.to_binary_s
383
+ end
384
+ tree.open_file(filename: filename)
385
+ end
386
+
387
+ it 'can take the Impersonation Level as an argument' do
388
+ allow(client).to receive(:send_recv) do |packet|
389
+ expect(packet.impersonation_level).to eq(RubySMB::ImpersonationLevels::SEC_DELEGATE)
390
+ create_response.to_binary_s
391
+ end
392
+ tree.open_file(filename: filename, impersonation: RubySMB::ImpersonationLevels::SEC_DELEGATE)
393
+ end
394
+ end
395
+
396
+ describe 'RWD access permissions' do
397
+ it 'will set the read permission from the parameters' do
398
+ allow(client).to receive(:send_recv) do |packet|
399
+ expect(packet.share_access.read_access).to eq(1)
400
+ expect(packet.desired_access.read_data).to eq(1)
401
+ create_response.to_binary_s
402
+ end
403
+ tree.open_file(filename: filename, read: true)
404
+ end
405
+
406
+ it 'will set the write permission from the parameters' do
407
+ allow(client).to receive(:send_recv) do |packet|
408
+ expect(packet.share_access.write_access).to eq(1)
409
+ expect(packet.desired_access.write_data).to eq(1)
410
+ expect(packet.desired_access.append_data).to eq(1)
411
+ create_response.to_binary_s
412
+ end
413
+ tree.open_file(filename: filename, write: true)
414
+ end
415
+
416
+ it 'will set the delete permission from the parameters' do
417
+ allow(client).to receive(:send_recv) do |packet|
418
+ expect(packet.share_access.delete_access).to eq(1)
419
+ expect(packet.desired_access.delete_access).to eq(1)
420
+ create_response.to_binary_s
421
+ end
422
+ tree.open_file(filename: filename, delete: true)
423
+ end
424
+ end
425
+
426
+ it 'sets #requested_oplock to 0xFF' do
427
+ allow(client).to receive(:send_recv) do |packet|
428
+ expect(packet.requested_oplock).to eq(0xFF)
429
+ create_response.to_binary_s
430
+ end
431
+ tree.open_file(filename: filename, delete: true)
432
+ end
433
+
434
+ it 'sends the CreateRequest request packet and gets the expected CreateResponse response back' do
435
+ expect(client).to receive(:send_recv).with(create_request, encrypt: false).and_return(create_response.to_binary_s)
436
+ tree.open_file(filename: filename)
437
+ end
438
+
439
+ it 'calls Client #send_recv with encryption set if required' do
440
+ tree.tree_connect_encrypt_data = true
441
+ expect(client).to receive(:send_recv).with(create_request, encrypt: true).and_return(create_response.to_binary_s)
442
+ tree.open_file(filename: filename)
443
+ end
444
+
445
+ context 'when sending the request packet and gets a response back' do
446
+ before :example do
447
+ allow(client).to receive(:send_recv).and_return(create_response.to_binary_s)
448
+ end
449
+
450
+ context 'when it is a file' do
451
+ context 'when encryption is not required' do
452
+ it 'returns the expected RubySMB::SMB2::File object' do
453
+ file_obj = RubySMB::SMB2::File.new(name: filename, tree: tree, response: create_response, encrypt: false)
454
+ expect(RubySMB::SMB2::File).to receive(:new).with(name: filename, tree: tree, response: create_response, encrypt: false).and_return(file_obj)
455
+ expect(tree.open_file(filename: filename)).to eq(file_obj)
456
+ end
457
+ end
458
+
459
+ context 'when encryption is required' do
460
+ it 'returns the expected RubySMB::SMB2::File object' do
461
+ file_obj = RubySMB::SMB2::File.new(name: filename, tree: tree, response: create_response, encrypt: true)
462
+ tree.tree_connect_encrypt_data = true
463
+ expect(RubySMB::SMB2::File).to receive(:new).with(name: filename, tree: tree, response: create_response, encrypt: true).and_return(file_obj)
464
+ expect(tree.open_file(filename: filename)).to eq(file_obj)
465
+ end
466
+ end
467
+ end
468
+
469
+ context 'when it is a pipe' do
470
+ it 'returns the expected RubySMB::SMB2::Pipe object' do
471
+ response.share_type = 0x02
472
+ pipe_obj = RubySMB::SMB2::Pipe.new(name: filename, tree: tree, response: create_response)
473
+ expect(RubySMB::SMB2::Pipe).to receive(:new).with(name: filename, tree: tree, response: create_response).and_return(pipe_obj)
474
+ expect(tree.open_file(filename: filename)).to eq(pipe_obj)
475
+ end
476
+ end
477
+
478
+ context 'when it is an unsupported share type' do
479
+ it 'raises a RubySMBError exception' do
480
+ response.share_type = 0x03
481
+ expect { tree.open_file(filename: filename) }.to raise_error(RubySMB::Error::RubySMBError)
482
+ end
483
+ end
484
+
485
+ context 'when the response is not a CreateResponse packet' do
486
+ it 'raises an InvalidPacket exception' do
487
+ create_response.smb2_header.command = RubySMB::SMB2::Commands::LOGOFF
488
+ expect { tree.open_file(filename: filename) }.to raise_error(RubySMB::Error::InvalidPacket)
489
+ end
490
+ end
491
+
492
+ context 'when the response status code is not STATUS_SUCCESS' do
493
+ it 'raises an UnexpectedStatusCode exception' do
494
+ create_response.smb2_header.nt_status = WindowsError::NTStatus::STATUS_INVALID_HANDLE.value
495
+ expect { tree.open_file(filename: filename) }.to raise_error(RubySMB::Error::UnexpectedStatusCode)
496
+ end
497
+ end
498
+ end
499
+ end
241
500
  end
metadata CHANGED
@@ -1,9 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_smb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
+ - Metasploit Hackers
7
8
  - David Maloney
8
9
  - James Lee
9
10
  - Dev Mohanty
@@ -13,85 +14,90 @@ bindir: bin
13
14
  cert_chain:
14
15
  - |
15
16
  -----BEGIN CERTIFICATE-----
16
- MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
17
- A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
18
- Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
19
- MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
20
- A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
21
- hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
22
- RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
23
- gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
24
- KPZpO/bLyCiR5Z2KYVc3rHQ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by/object:Gem::Dependency
97
103
  name: redcarpet
@@ -205,12 +211,37 @@ dependencies:
205
211
  - - ">="
206
212
  - !ruby/object:Gem::Version
207
213
  version: '0'
214
+ - !ruby/object:Gem::Dependency
215
+ name: openssl-ccm
216
+ requirement: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - ">="
219
+ - !ruby/object:Gem::Version
220
+ version: '0'
221
+ type: :runtime
222
+ prerelease: false
223
+ version_requirements: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - ">="
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
228
+ - !ruby/object:Gem::Dependency
229
+ name: openssl-cmac
230
+ requirement: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - ">="
233
+ - !ruby/object:Gem::Version
234
+ version: '0'
235
+ type: :runtime
236
+ prerelease: false
237
+ version_requirements: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - ">="
240
+ - !ruby/object:Gem::Version
241
+ version: '0'
208
242
  description: ''
209
243
  email:
210
- - DMaloney@rapid7.com
211
- - egypt@metasploit.com
212
- - dev_mohanty@rapid7.com
213
- - paristvinternet-github@yahoo.com
244
+ - msfdev@metasploit.com
214
245
  executables: []
215
246
  extensions: []
216
247
  extra_rdoc_files: []
@@ -229,12 +260,16 @@ files:
229
260
  - examples/append_file.rb
230
261
  - examples/authenticate.rb
231
262
  - examples/delete_file.rb
263
+ - examples/enum_registry_key.rb
264
+ - examples/enum_registry_values.rb
232
265
  - examples/list_directory.rb
233
266
  - examples/negotiate.rb
234
267
  - examples/negotiate_with_netbios_service.rb
235
268
  - examples/net_share_enum_all.rb
236
269
  - examples/pipes.rb
237
270
  - examples/read_file.rb
271
+ - examples/read_file_encryption.rb
272
+ - examples/read_registry_key_value.rb
238
273
  - examples/rename_file.rb
239
274
  - examples/tree_connect.rb
240
275
  - examples/write_file.rb
@@ -242,10 +277,13 @@ files:
242
277
  - lib/ruby_smb/client.rb
243
278
  - lib/ruby_smb/client/authentication.rb
244
279
  - lib/ruby_smb/client/echo.rb
280
+ - lib/ruby_smb/client/encryption.rb
245
281
  - lib/ruby_smb/client/negotiation.rb
246
282
  - lib/ruby_smb/client/signing.rb
247
283
  - lib/ruby_smb/client/tree_connect.rb
248
284
  - lib/ruby_smb/client/utils.rb
285
+ - lib/ruby_smb/client/winreg.rb
286
+ - lib/ruby_smb/crypto.rb
249
287
  - lib/ruby_smb/dcerpc.rb
250
288
  - lib/ruby_smb/dcerpc/bind.rb
251
289
  - lib/ruby_smb/dcerpc/bind_ack.rb
@@ -256,9 +294,26 @@ files:
256
294
  - lib/ruby_smb/dcerpc/ptypes.rb
257
295
  - lib/ruby_smb/dcerpc/request.rb
258
296
  - lib/ruby_smb/dcerpc/response.rb
297
+ - lib/ruby_smb/dcerpc/rrp_unicode_string.rb
259
298
  - lib/ruby_smb/dcerpc/srvsvc.rb
260
299
  - lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all.rb
261
300
  - lib/ruby_smb/dcerpc/uuid.rb
301
+ - lib/ruby_smb/dcerpc/winreg.rb
302
+ - lib/ruby_smb/dcerpc/winreg/close_key_request.rb
303
+ - lib/ruby_smb/dcerpc/winreg/close_key_response.rb
304
+ - lib/ruby_smb/dcerpc/winreg/enum_key_request.rb
305
+ - lib/ruby_smb/dcerpc/winreg/enum_key_response.rb
306
+ - lib/ruby_smb/dcerpc/winreg/enum_value_request.rb
307
+ - lib/ruby_smb/dcerpc/winreg/enum_value_response.rb
308
+ - lib/ruby_smb/dcerpc/winreg/open_key_request.rb
309
+ - lib/ruby_smb/dcerpc/winreg/open_key_response.rb
310
+ - lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb
311
+ - lib/ruby_smb/dcerpc/winreg/open_root_key_response.rb
312
+ - lib/ruby_smb/dcerpc/winreg/query_info_key_request.rb
313
+ - lib/ruby_smb/dcerpc/winreg/query_info_key_response.rb
314
+ - lib/ruby_smb/dcerpc/winreg/query_value_request.rb
315
+ - lib/ruby_smb/dcerpc/winreg/query_value_response.rb
316
+ - lib/ruby_smb/dcerpc/winreg/regsam.rb
262
317
  - lib/ruby_smb/dispatcher.rb
263
318
  - lib/ruby_smb/dispatcher/base.rb
264
319
  - lib/ruby_smb/dispatcher/socket.rb
@@ -324,7 +379,6 @@ files:
324
379
  - lib/ruby_smb/smb1/commands.rb
325
380
  - lib/ruby_smb/smb1/create_actions.rb
326
381
  - lib/ruby_smb/smb1/data_block.rb
327
- - lib/ruby_smb/smb1/dcerpc.rb
328
382
  - lib/ruby_smb/smb1/dialect.rb
329
383
  - lib/ruby_smb/smb1/file.rb
330
384
  - lib/ruby_smb/smb1/oplock_levels.rb
@@ -402,12 +456,13 @@ files:
402
456
  - lib/ruby_smb/smb2/bit_field/smb2_security_mode_single.rb
403
457
  - lib/ruby_smb/smb2/commands.rb
404
458
  - lib/ruby_smb/smb2/create_context.rb
405
- - lib/ruby_smb/smb2/dcerpc.rb
406
459
  - lib/ruby_smb/smb2/file.rb
407
460
  - lib/ruby_smb/smb2/info_type.rb
461
+ - lib/ruby_smb/smb2/negotiate_context.rb
408
462
  - lib/ruby_smb/smb2/packet.rb
409
463
  - lib/ruby_smb/smb2/packet/close_request.rb
410
464
  - lib/ruby_smb/smb2/packet/close_response.rb
465
+ - lib/ruby_smb/smb2/packet/compression_transform_header.rb
411
466
  - lib/ruby_smb/smb2/packet/create_request.rb
412
467
  - lib/ruby_smb/smb2/packet/create_response.rb
413
468
  - lib/ruby_smb/smb2/packet/echo_request.rb
@@ -427,6 +482,7 @@ files:
427
482
  - lib/ruby_smb/smb2/packet/session_setup_response.rb
428
483
  - lib/ruby_smb/smb2/packet/set_info_request.rb
429
484
  - lib/ruby_smb/smb2/packet/set_info_response.rb
485
+ - lib/ruby_smb/smb2/packet/transform_header.rb
430
486
  - lib/ruby_smb/smb2/packet/tree_connect_request.rb
431
487
  - lib/ruby_smb/smb2/packet/tree_connect_response.rb
432
488
  - lib/ruby_smb/smb2/packet/tree_disconnect_request.rb
@@ -439,16 +495,38 @@ files:
439
495
  - lib/ruby_smb/version.rb
440
496
  - ruby_smb.gemspec
441
497
  - spec/lib/ruby_smb/client_spec.rb
498
+ - spec/lib/ruby_smb/crypto_spec.rb
442
499
  - spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
443
500
  - spec/lib/ruby_smb/dcerpc/bind_spec.rb
501
+ - spec/lib/ruby_smb/dcerpc/ndr_spec.rb
444
502
  - spec/lib/ruby_smb/dcerpc/p_syntax_id_t_spec.rb
445
503
  - spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
446
504
  - spec/lib/ruby_smb/dcerpc/request_spec.rb
447
505
  - spec/lib/ruby_smb/dcerpc/response_spec.rb
506
+ - spec/lib/ruby_smb/dcerpc/rrp_unicode_string_spec.rb
448
507
  - spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb
508
+ - spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb
449
509
  - spec/lib/ruby_smb/dcerpc/uuid_spec.rb
510
+ - spec/lib/ruby_smb/dcerpc/winreg/close_key_request_spec.rb
511
+ - spec/lib/ruby_smb/dcerpc/winreg/close_key_response_spec.rb
512
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_key_request_spec.rb
513
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_key_response_spec.rb
514
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_value_request_spec.rb
515
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_value_response_spec.rb
516
+ - spec/lib/ruby_smb/dcerpc/winreg/open_key_request_spec.rb
517
+ - spec/lib/ruby_smb/dcerpc/winreg/open_key_response_spec.rb
518
+ - spec/lib/ruby_smb/dcerpc/winreg/open_root_key_request_spec.rb
519
+ - spec/lib/ruby_smb/dcerpc/winreg/open_root_key_response_spec.rb
520
+ - spec/lib/ruby_smb/dcerpc/winreg/query_info_key_request_spec.rb
521
+ - spec/lib/ruby_smb/dcerpc/winreg/query_info_key_response_spec.rb
522
+ - spec/lib/ruby_smb/dcerpc/winreg/query_value_request_spec.rb
523
+ - spec/lib/ruby_smb/dcerpc/winreg/query_value_response_spec.rb
524
+ - spec/lib/ruby_smb/dcerpc/winreg/regsam_spec.rb
525
+ - spec/lib/ruby_smb/dcerpc/winreg_spec.rb
526
+ - spec/lib/ruby_smb/dcerpc_spec.rb
450
527
  - spec/lib/ruby_smb/dispatcher/base_spec.rb
451
528
  - spec/lib/ruby_smb/dispatcher/socket_spec.rb
529
+ - spec/lib/ruby_smb/error_spec.rb
452
530
  - spec/lib/ruby_smb/field/extended_attribute_flag_spec.rb
453
531
  - spec/lib/ruby_smb/field/file_time_spec.rb
454
532
  - spec/lib/ruby_smb/field/nt_status_spec.rb
@@ -503,7 +581,7 @@ files:
503
581
  - spec/lib/ruby_smb/smb1/packet/close_response_spec.rb
504
582
  - spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
505
583
  - spec/lib/ruby_smb/smb1/packet/echo_response_spec.rb
506
- - spec/lib/ruby_smb/smb1/packet/error_packet_spec.rb
584
+ - spec/lib/ruby_smb/smb1/packet/empty_packet_spec.rb
507
585
  - spec/lib/ruby_smb/smb1/packet/logoff_request_spec.rb
508
586
  - spec/lib/ruby_smb/smb1/packet/logoff_response_spec.rb
509
587
  - spec/lib/ruby_smb/smb1/packet/negotiate_request_spec.rb
@@ -560,12 +638,15 @@ files:
560
638
  - spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
561
639
  - spec/lib/ruby_smb/smb2/create_context_spec.rb
562
640
  - spec/lib/ruby_smb/smb2/file_spec.rb
641
+ - spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
563
642
  - spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
564
643
  - spec/lib/ruby_smb/smb2/packet/close_response_spec.rb
644
+ - spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb
565
645
  - spec/lib/ruby_smb/smb2/packet/create_request_spec.rb
566
646
  - spec/lib/ruby_smb/smb2/packet/create_response_spec.rb
567
647
  - spec/lib/ruby_smb/smb2/packet/echo_request_spec.rb
568
648
  - spec/lib/ruby_smb/smb2/packet/echo_response_spec.rb
649
+ - spec/lib/ruby_smb/smb2/packet/error_packet_spec.rb
569
650
  - spec/lib/ruby_smb/smb2/packet/ioctl_request_spec.rb
570
651
  - spec/lib/ruby_smb/smb2/packet/logoff_request_spec.rb
571
652
  - spec/lib/ruby_smb/smb2/packet/logoff_response_spec.rb
@@ -579,6 +660,7 @@ files:
579
660
  - spec/lib/ruby_smb/smb2/packet/session_setup_response_spec.rb
580
661
  - spec/lib/ruby_smb/smb2/packet/set_info_request_spec.rb
581
662
  - spec/lib/ruby_smb/smb2/packet/set_info_response_spec.rb
663
+ - spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb
582
664
  - spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb
583
665
  - spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb
584
666
  - spec/lib/ruby_smb/smb2/packet/tree_disconnect_request_spec.rb
@@ -604,7 +686,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
604
686
  requirements:
605
687
  - - ">="
606
688
  - !ruby/object:Gem::Version
607
- version: 2.2.0
689
+ version: '2.5'
608
690
  required_rubygems_version: !ruby/object:Gem::Requirement
609
691
  requirements:
610
692
  - - ">="
@@ -612,22 +694,44 @@ required_rubygems_version: !ruby/object:Gem::Requirement
612
694
  version: '0'
613
695
  requirements: []
614
696
  rubyforge_project:
615
- rubygems_version: 2.6.13
697
+ rubygems_version: 2.7.10
616
698
  signing_key:
617
699
  specification_version: 4
618
700
  summary: A pure Ruby implementation of the SMB Protocol Family
619
701
  test_files:
620
702
  - spec/lib/ruby_smb/client_spec.rb
703
+ - spec/lib/ruby_smb/crypto_spec.rb
621
704
  - spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
622
705
  - spec/lib/ruby_smb/dcerpc/bind_spec.rb
706
+ - spec/lib/ruby_smb/dcerpc/ndr_spec.rb
623
707
  - spec/lib/ruby_smb/dcerpc/p_syntax_id_t_spec.rb
624
708
  - spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
625
709
  - spec/lib/ruby_smb/dcerpc/request_spec.rb
626
710
  - spec/lib/ruby_smb/dcerpc/response_spec.rb
711
+ - spec/lib/ruby_smb/dcerpc/rrp_unicode_string_spec.rb
627
712
  - spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb
713
+ - spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb
628
714
  - spec/lib/ruby_smb/dcerpc/uuid_spec.rb
715
+ - spec/lib/ruby_smb/dcerpc/winreg/close_key_request_spec.rb
716
+ - spec/lib/ruby_smb/dcerpc/winreg/close_key_response_spec.rb
717
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_key_request_spec.rb
718
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_key_response_spec.rb
719
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_value_request_spec.rb
720
+ - spec/lib/ruby_smb/dcerpc/winreg/enum_value_response_spec.rb
721
+ - spec/lib/ruby_smb/dcerpc/winreg/open_key_request_spec.rb
722
+ - spec/lib/ruby_smb/dcerpc/winreg/open_key_response_spec.rb
723
+ - spec/lib/ruby_smb/dcerpc/winreg/open_root_key_request_spec.rb
724
+ - spec/lib/ruby_smb/dcerpc/winreg/open_root_key_response_spec.rb
725
+ - spec/lib/ruby_smb/dcerpc/winreg/query_info_key_request_spec.rb
726
+ - spec/lib/ruby_smb/dcerpc/winreg/query_info_key_response_spec.rb
727
+ - spec/lib/ruby_smb/dcerpc/winreg/query_value_request_spec.rb
728
+ - spec/lib/ruby_smb/dcerpc/winreg/query_value_response_spec.rb
729
+ - spec/lib/ruby_smb/dcerpc/winreg/regsam_spec.rb
730
+ - spec/lib/ruby_smb/dcerpc/winreg_spec.rb
731
+ - spec/lib/ruby_smb/dcerpc_spec.rb
629
732
  - spec/lib/ruby_smb/dispatcher/base_spec.rb
630
733
  - spec/lib/ruby_smb/dispatcher/socket_spec.rb
734
+ - spec/lib/ruby_smb/error_spec.rb
631
735
  - spec/lib/ruby_smb/field/extended_attribute_flag_spec.rb
632
736
  - spec/lib/ruby_smb/field/file_time_spec.rb
633
737
  - spec/lib/ruby_smb/field/nt_status_spec.rb
@@ -682,7 +786,7 @@ test_files:
682
786
  - spec/lib/ruby_smb/smb1/packet/close_response_spec.rb
683
787
  - spec/lib/ruby_smb/smb1/packet/echo_request_spec.rb
684
788
  - spec/lib/ruby_smb/smb1/packet/echo_response_spec.rb
685
- - spec/lib/ruby_smb/smb1/packet/error_packet_spec.rb
789
+ - spec/lib/ruby_smb/smb1/packet/empty_packet_spec.rb
686
790
  - spec/lib/ruby_smb/smb1/packet/logoff_request_spec.rb
687
791
  - spec/lib/ruby_smb/smb1/packet/logoff_response_spec.rb
688
792
  - spec/lib/ruby_smb/smb1/packet/negotiate_request_spec.rb
@@ -739,12 +843,15 @@ test_files:
739
843
  - spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
740
844
  - spec/lib/ruby_smb/smb2/create_context_spec.rb
741
845
  - spec/lib/ruby_smb/smb2/file_spec.rb
846
+ - spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
742
847
  - spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
743
848
  - spec/lib/ruby_smb/smb2/packet/close_response_spec.rb
849
+ - spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb
744
850
  - spec/lib/ruby_smb/smb2/packet/create_request_spec.rb
745
851
  - spec/lib/ruby_smb/smb2/packet/create_response_spec.rb
746
852
  - spec/lib/ruby_smb/smb2/packet/echo_request_spec.rb
747
853
  - spec/lib/ruby_smb/smb2/packet/echo_response_spec.rb
854
+ - spec/lib/ruby_smb/smb2/packet/error_packet_spec.rb
748
855
  - spec/lib/ruby_smb/smb2/packet/ioctl_request_spec.rb
749
856
  - spec/lib/ruby_smb/smb2/packet/logoff_request_spec.rb
750
857
  - spec/lib/ruby_smb/smb2/packet/logoff_response_spec.rb
@@ -758,6 +865,7 @@ test_files:
758
865
  - spec/lib/ruby_smb/smb2/packet/session_setup_response_spec.rb
759
866
  - spec/lib/ruby_smb/smb2/packet/set_info_request_spec.rb
760
867
  - spec/lib/ruby_smb/smb2/packet/set_info_response_spec.rb
868
+ - spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb
761
869
  - spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb
762
870
  - spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb
763
871
  - spec/lib/ruby_smb/smb2/packet/tree_disconnect_request_spec.rb