ruby_smb 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/examples/auth_capture.rb +28 -0
- data/examples/file_server.rb +76 -0
- data/lib/ruby_smb/create_actions.rb +21 -0
- data/lib/ruby_smb/field/nt_status.rb +20 -1
- data/lib/ruby_smb/fscc/file_information/file_ea_information.rb +14 -0
- data/lib/ruby_smb/fscc/file_information/file_network_open_information.rb +22 -0
- data/lib/ruby_smb/fscc/file_information/file_stream_information.rb +16 -0
- data/lib/ruby_smb/fscc/file_information.rb +29 -0
- data/lib/ruby_smb/fscc/file_system_information/file_fs_attribute_information.rb +46 -0
- data/lib/ruby_smb/fscc/file_system_information/file_fs_volume_information.rb +19 -0
- data/lib/ruby_smb/fscc/file_system_information.rb +22 -0
- data/lib/ruby_smb/fscc.rb +1 -0
- data/lib/ruby_smb/generic_packet.rb +6 -0
- data/lib/ruby_smb/gss/provider/authenticator.rb +4 -0
- data/lib/ruby_smb/gss/provider/ntlm.rb +13 -3
- data/lib/ruby_smb/server/server_client/negotiation.rb +0 -2
- data/lib/ruby_smb/server/server_client/session_setup.rb +43 -32
- data/lib/ruby_smb/server/server_client/share_io.rb +28 -0
- data/lib/ruby_smb/server/server_client/tree_connect.rb +60 -0
- data/lib/ruby_smb/server/server_client.rb +214 -24
- data/lib/ruby_smb/server/session.rb +71 -0
- data/lib/ruby_smb/server/share/provider/disk.rb +437 -0
- data/lib/ruby_smb/server/share/provider/pipe.rb +27 -0
- data/lib/ruby_smb/server/share/provider/processor.rb +76 -0
- data/lib/ruby_smb/server/share/provider.rb +38 -0
- data/lib/ruby_smb/server/share.rb +11 -0
- data/lib/ruby_smb/server.rb +35 -3
- data/lib/ruby_smb/signing.rb +37 -11
- data/lib/ruby_smb/smb1/commands.rb +4 -0
- data/lib/ruby_smb/smb1.rb +0 -1
- data/lib/ruby_smb/smb2/bit_field/smb2_header_flags.rb +2 -1
- data/lib/ruby_smb/smb2/commands.rb +4 -0
- data/lib/ruby_smb/smb2/create_context/request.rb +64 -0
- data/lib/ruby_smb/smb2/create_context/response.rb +62 -0
- data/lib/ruby_smb/smb2/create_context.rb +74 -22
- data/lib/ruby_smb/smb2/packet/create_request.rb +44 -11
- data/lib/ruby_smb/smb2/packet/create_response.rb +17 -3
- data/lib/ruby_smb/smb2/packet/query_directory_request.rb +1 -1
- data/lib/ruby_smb/smb2/packet/query_directory_response.rb +2 -2
- data/lib/ruby_smb/smb2/packet/query_info_request.rb +43 -0
- data/lib/ruby_smb/smb2/packet/query_info_response.rb +23 -0
- data/lib/ruby_smb/smb2/packet/tree_connect_response.rb +1 -1
- data/lib/ruby_smb/smb2/packet/tree_disconnect_response.rb +1 -0
- data/lib/ruby_smb/smb2/packet.rb +2 -0
- data/lib/ruby_smb/smb2.rb +11 -0
- data/lib/ruby_smb/smb_error.rb +110 -0
- data/lib/ruby_smb/version.rb +1 -1
- data/lib/ruby_smb.rb +2 -0
- data/ruby_smb.gemspec +1 -1
- data/spec/lib/ruby_smb/field/nt_status_spec.rb +6 -2
- data/spec/lib/ruby_smb/gss/provider/ntlm/authenticator_spec.rb +4 -0
- data/spec/lib/ruby_smb/server/server_client_spec.rb +36 -53
- data/spec/lib/ruby_smb/server/session_spec.rb +38 -0
- data/spec/lib/ruby_smb/server/share/provider/disk_spec.rb +61 -0
- data/spec/lib/ruby_smb/server/share/provider/pipe_spec.rb +31 -0
- data/spec/lib/ruby_smb/server/share/provider_spec.rb +13 -0
- data/spec/lib/ruby_smb/smb2/bit_field/header_flags_spec.rb +8 -2
- data/spec/lib/ruby_smb/smb2/{create_context_spec.rb → create_context/create_context_request_spec.rb} +1 -1
- data/spec/lib/ruby_smb/smb2/packet/create_request_spec.rb +5 -5
- data/spec/lib/ruby_smb/smb2/packet/create_response_spec.rb +9 -5
- data/spec/lib/ruby_smb/smb2/packet/query_directory_response_spec.rb +3 -2
- data.tar.gz.sig +0 -0
- metadata +35 -7
- metadata.gz.sig +0 -0
- data/lib/ruby_smb/smb1/create_actions.rb +0 -20
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.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -97,7 +97,7 @@ cert_chain:
|
|
97
97
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
98
98
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
99
99
|
-----END CERTIFICATE-----
|
100
|
-
date: 2022-01-
|
100
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
101
101
|
dependencies:
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: redcarpet
|
@@ -189,14 +189,14 @@ dependencies:
|
|
189
189
|
requirements:
|
190
190
|
- - ">="
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
192
|
+
version: 0.1.3
|
193
193
|
type: :runtime
|
194
194
|
prerelease: false
|
195
195
|
version_requirements: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
197
|
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
199
|
+
version: 0.1.3
|
200
200
|
- !ruby/object:Gem::Dependency
|
201
201
|
name: bindata
|
202
202
|
requirement: !ruby/object:Gem::Requirement
|
@@ -265,6 +265,7 @@ files:
|
|
265
265
|
- examples/enum_domain_users.rb
|
266
266
|
- examples/enum_registry_key.rb
|
267
267
|
- examples/enum_registry_values.rb
|
268
|
+
- examples/file_server.rb
|
268
269
|
- examples/get_computer_info.rb
|
269
270
|
- examples/list_directory.rb
|
270
271
|
- examples/negotiate.rb
|
@@ -289,6 +290,7 @@ files:
|
|
289
290
|
- lib/ruby_smb/client/winreg.rb
|
290
291
|
- lib/ruby_smb/compression.rb
|
291
292
|
- lib/ruby_smb/compression/lznt1.rb
|
293
|
+
- lib/ruby_smb/create_actions.rb
|
292
294
|
- lib/ruby_smb/crypto.rb
|
293
295
|
- lib/ruby_smb/dcerpc.rb
|
294
296
|
- lib/ruby_smb/dcerpc/bind.rb
|
@@ -420,11 +422,17 @@ files:
|
|
420
422
|
- lib/ruby_smb/fscc/file_information/file_both_directory_information.rb
|
421
423
|
- lib/ruby_smb/fscc/file_information/file_directory_information.rb
|
422
424
|
- lib/ruby_smb/fscc/file_information/file_disposition_information.rb
|
425
|
+
- lib/ruby_smb/fscc/file_information/file_ea_information.rb
|
423
426
|
- lib/ruby_smb/fscc/file_information/file_full_directory_information.rb
|
424
427
|
- lib/ruby_smb/fscc/file_information/file_id_both_directory_information.rb
|
425
428
|
- lib/ruby_smb/fscc/file_information/file_id_full_directory_information.rb
|
426
429
|
- lib/ruby_smb/fscc/file_information/file_names_information.rb
|
430
|
+
- lib/ruby_smb/fscc/file_information/file_network_open_information.rb
|
427
431
|
- lib/ruby_smb/fscc/file_information/file_rename_information.rb
|
432
|
+
- lib/ruby_smb/fscc/file_information/file_stream_information.rb
|
433
|
+
- lib/ruby_smb/fscc/file_system_information.rb
|
434
|
+
- lib/ruby_smb/fscc/file_system_information/file_fs_attribute_information.rb
|
435
|
+
- lib/ruby_smb/fscc/file_system_information/file_fs_volume_information.rb
|
428
436
|
- lib/ruby_smb/generic_packet.rb
|
429
437
|
- lib/ruby_smb/gss.rb
|
430
438
|
- lib/ruby_smb/gss/provider.rb
|
@@ -441,6 +449,14 @@ files:
|
|
441
449
|
- lib/ruby_smb/server/server_client.rb
|
442
450
|
- lib/ruby_smb/server/server_client/negotiation.rb
|
443
451
|
- lib/ruby_smb/server/server_client/session_setup.rb
|
452
|
+
- lib/ruby_smb/server/server_client/share_io.rb
|
453
|
+
- lib/ruby_smb/server/server_client/tree_connect.rb
|
454
|
+
- lib/ruby_smb/server/session.rb
|
455
|
+
- lib/ruby_smb/server/share.rb
|
456
|
+
- lib/ruby_smb/server/share/provider.rb
|
457
|
+
- lib/ruby_smb/server/share/provider/disk.rb
|
458
|
+
- lib/ruby_smb/server/share/provider/pipe.rb
|
459
|
+
- lib/ruby_smb/server/share/provider/processor.rb
|
444
460
|
- lib/ruby_smb/signing.rb
|
445
461
|
- lib/ruby_smb/smb1.rb
|
446
462
|
- lib/ruby_smb/smb1/andx_block.rb
|
@@ -465,7 +481,6 @@ files:
|
|
465
481
|
- lib/ruby_smb/smb1/bit_field/trans_flags.rb
|
466
482
|
- lib/ruby_smb/smb1/bit_field/tree_connect_flags.rb
|
467
483
|
- lib/ruby_smb/smb1/commands.rb
|
468
|
-
- lib/ruby_smb/smb1/create_actions.rb
|
469
484
|
- lib/ruby_smb/smb1/data_block.rb
|
470
485
|
- lib/ruby_smb/smb1/dialect.rb
|
471
486
|
- lib/ruby_smb/smb1/file.rb
|
@@ -544,6 +559,8 @@ files:
|
|
544
559
|
- lib/ruby_smb/smb2/bit_field/smb2_security_mode_single.rb
|
545
560
|
- lib/ruby_smb/smb2/commands.rb
|
546
561
|
- lib/ruby_smb/smb2/create_context.rb
|
562
|
+
- lib/ruby_smb/smb2/create_context/request.rb
|
563
|
+
- lib/ruby_smb/smb2/create_context/response.rb
|
547
564
|
- lib/ruby_smb/smb2/file.rb
|
548
565
|
- lib/ruby_smb/smb2/info_type.rb
|
549
566
|
- lib/ruby_smb/smb2/negotiate_context.rb
|
@@ -564,6 +581,8 @@ files:
|
|
564
581
|
- lib/ruby_smb/smb2/packet/negotiate_response.rb
|
565
582
|
- lib/ruby_smb/smb2/packet/query_directory_request.rb
|
566
583
|
- lib/ruby_smb/smb2/packet/query_directory_response.rb
|
584
|
+
- lib/ruby_smb/smb2/packet/query_info_request.rb
|
585
|
+
- lib/ruby_smb/smb2/packet/query_info_response.rb
|
567
586
|
- lib/ruby_smb/smb2/packet/read_request.rb
|
568
587
|
- lib/ruby_smb/smb2/packet/read_response.rb
|
569
588
|
- lib/ruby_smb/smb2/packet/session_setup_request.rb
|
@@ -580,6 +599,7 @@ files:
|
|
580
599
|
- lib/ruby_smb/smb2/pipe.rb
|
581
600
|
- lib/ruby_smb/smb2/smb2_header.rb
|
582
601
|
- lib/ruby_smb/smb2/tree.rb
|
602
|
+
- lib/ruby_smb/smb_error.rb
|
583
603
|
- lib/ruby_smb/version.rb
|
584
604
|
- ruby_smb.gemspec
|
585
605
|
- spec/lib/ruby_smb/client_spec.rb
|
@@ -699,6 +719,10 @@ files:
|
|
699
719
|
- spec/lib/ruby_smb/nbss/session_header_spec.rb
|
700
720
|
- spec/lib/ruby_smb/nbss/session_request_spec.rb
|
701
721
|
- spec/lib/ruby_smb/server/server_client_spec.rb
|
722
|
+
- spec/lib/ruby_smb/server/session_spec.rb
|
723
|
+
- spec/lib/ruby_smb/server/share/provider/disk_spec.rb
|
724
|
+
- spec/lib/ruby_smb/server/share/provider/pipe_spec.rb
|
725
|
+
- spec/lib/ruby_smb/server/share/provider_spec.rb
|
702
726
|
- spec/lib/ruby_smb/server_spec.rb
|
703
727
|
- spec/lib/ruby_smb/smb1/andx_block_spec.rb
|
704
728
|
- spec/lib/ruby_smb/smb1/bit_field/capabilities_spec.rb
|
@@ -782,7 +806,7 @@ files:
|
|
782
806
|
- spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb
|
783
807
|
- spec/lib/ruby_smb/smb2/bit_field/smb2_capabilities_spec.rb
|
784
808
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
785
|
-
- spec/lib/ruby_smb/smb2/
|
809
|
+
- spec/lib/ruby_smb/smb2/create_context/create_context_request_spec.rb
|
786
810
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
787
811
|
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
788
812
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
@@ -963,6 +987,10 @@ test_files:
|
|
963
987
|
- spec/lib/ruby_smb/nbss/session_header_spec.rb
|
964
988
|
- spec/lib/ruby_smb/nbss/session_request_spec.rb
|
965
989
|
- spec/lib/ruby_smb/server/server_client_spec.rb
|
990
|
+
- spec/lib/ruby_smb/server/session_spec.rb
|
991
|
+
- spec/lib/ruby_smb/server/share/provider/disk_spec.rb
|
992
|
+
- spec/lib/ruby_smb/server/share/provider/pipe_spec.rb
|
993
|
+
- spec/lib/ruby_smb/server/share/provider_spec.rb
|
966
994
|
- spec/lib/ruby_smb/server_spec.rb
|
967
995
|
- spec/lib/ruby_smb/smb1/andx_block_spec.rb
|
968
996
|
- spec/lib/ruby_smb/smb1/bit_field/capabilities_spec.rb
|
@@ -1046,7 +1074,7 @@ test_files:
|
|
1046
1074
|
- spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb
|
1047
1075
|
- spec/lib/ruby_smb/smb2/bit_field/smb2_capabilities_spec.rb
|
1048
1076
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
1049
|
-
- spec/lib/ruby_smb/smb2/
|
1077
|
+
- spec/lib/ruby_smb/smb2/create_context/create_context_request_spec.rb
|
1050
1078
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
1051
1079
|
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
1052
1080
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module RubySMB
|
2
|
-
module SMB1
|
3
|
-
# This module holds the Create Actions used in NT_TRANSACT_CREATE and
|
4
|
-
# SMB_COM_NT_CREATE_ANDX responses. The definitions for these values can be found at
|
5
|
-
# [2.2.7.1.2 Response](https://msdn.microsoft.com/en-us/library/ee441961.aspx)
|
6
|
-
module CreateActions
|
7
|
-
# An existing file was deleted and a new file was created in its place.
|
8
|
-
FILE_SUPERSEDED = 0x00000000
|
9
|
-
|
10
|
-
# An existing file was opened.
|
11
|
-
FILE_OPENED = 0x00000001
|
12
|
-
|
13
|
-
# A new file was created.
|
14
|
-
FILE_CREATED = 0x00000002
|
15
|
-
|
16
|
-
# An existing file was overwritten.
|
17
|
-
FILE_OVERWRITEN = 0x00000003
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|