ruby_smb 2.0.11 → 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/.github/workflows/verify.yml +5 -16
- data/examples/auth_capture.rb +28 -0
- data/examples/dump_secrets_from_sid.rb +207 -0
- data/examples/enum_domain_users.rb +75 -0
- data/examples/file_server.rb +76 -0
- data/examples/get_computer_info.rb +42 -0
- data/examples/query_service_status.rb +42 -4
- data/lib/ruby_smb/client.rb +3 -14
- data/lib/ruby_smb/create_actions.rb +21 -0
- data/lib/ruby_smb/dcerpc/bind.rb +28 -20
- data/lib/ruby_smb/dcerpc/bind_ack.rb +29 -28
- data/lib/ruby_smb/dcerpc/client.rb +542 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_bind_request.rb +24 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_bind_response.rb +26 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_crack_names_request.rb +57 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_crack_names_response.rb +76 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_domain_controller_info_request.rb +46 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_domain_controller_info_response.rb +168 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_extensions.rb +56 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_get_nc_changes_request.rb +121 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_get_nc_changes_response.rb +118 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_unbind_request.rb +24 -0
- data/lib/ruby_smb/dcerpc/drsr/drs_unbind_response.rb +26 -0
- data/lib/ruby_smb/dcerpc/drsr.rb +909 -0
- data/lib/ruby_smb/dcerpc/epm/epm_ept_map_request.rb +26 -0
- data/lib/ruby_smb/dcerpc/epm/epm_ept_map_response.rb +25 -0
- data/lib/ruby_smb/dcerpc/epm/epm_twrt.rb +211 -0
- data/lib/ruby_smb/dcerpc/epm.rb +75 -0
- data/lib/ruby_smb/dcerpc/error.rb +17 -0
- data/lib/ruby_smb/dcerpc/ndr.rb +1159 -297
- data/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_request.rb +3 -13
- data/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_response.rb +3 -3
- data/lib/ruby_smb/dcerpc/netlogon/netr_server_password_set2_request.rb +3 -13
- data/lib/ruby_smb/dcerpc/netlogon/netr_server_password_set2_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/netlogon/netr_server_req_challenge_request.rb +3 -11
- data/lib/ruby_smb/dcerpc/netlogon/netr_server_req_challenge_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/netlogon.rb +5 -4
- data/lib/ruby_smb/dcerpc/p_syntax_id_t.rb +4 -3
- data/lib/ruby_smb/dcerpc/pdu_header.rb +7 -7
- data/lib/ruby_smb/dcerpc/ptypes.rb +1 -0
- data/lib/ruby_smb/dcerpc/request.rb +79 -32
- data/lib/ruby_smb/dcerpc/response.rb +45 -10
- data/lib/ruby_smb/dcerpc/rpc_auth3.rb +28 -0
- data/lib/ruby_smb/dcerpc/rpc_security_attributes.rb +11 -11
- data/lib/ruby_smb/dcerpc/rrp_rpc_unicode_string.rb +118 -0
- data/lib/ruby_smb/dcerpc/samr/rpc_sid.rb +150 -0
- data/lib/ruby_smb/dcerpc/samr/samr_close_handle_request.rb +23 -0
- data/lib/ruby_smb/dcerpc/samr/samr_close_handle_response.rb +24 -0
- data/lib/ruby_smb/dcerpc/samr/samr_connect_request.rb +32 -0
- data/lib/ruby_smb/dcerpc/samr/samr_connect_response.rb +23 -0
- data/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_request.rb +26 -0
- data/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_response.rb +55 -0
- data/lib/ruby_smb/dcerpc/samr/samr_get_alias_membership_request.rb +48 -0
- data/lib/ruby_smb/dcerpc/samr/samr_get_alias_membership_response.rb +38 -0
- data/lib/ruby_smb/dcerpc/samr/samr_get_groups_for_user_request.rb +23 -0
- data/lib/ruby_smb/dcerpc/samr/samr_get_groups_for_user_response.rb +48 -0
- data/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_request.rb +24 -0
- data/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_response.rb +25 -0
- data/lib/ruby_smb/dcerpc/samr/samr_open_domain_request.rb +27 -0
- data/lib/ruby_smb/dcerpc/samr/samr_open_domain_response.rb +24 -0
- data/lib/ruby_smb/dcerpc/samr/samr_open_user_request.rb +26 -0
- data/lib/ruby_smb/dcerpc/samr/samr_open_user_response.rb +24 -0
- data/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_request.rb +23 -0
- data/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_response.rb +23 -0
- data/lib/ruby_smb/dcerpc/samr.rb +613 -0
- data/lib/ruby_smb/dcerpc/sec_trailer.rb +26 -0
- data/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all.rb +56 -79
- data/lib/ruby_smb/dcerpc/srvsvc.rb +27 -4
- data/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request.rb +13 -25
- data/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_response.rb +2 -2
- data/lib/ruby_smb/dcerpc/svcctl/close_service_handle_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl/control_service_request.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl/control_service_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request.rb +4 -14
- data/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl/open_service_w_request.rb +3 -11
- data/lib/ruby_smb/dcerpc/svcctl/open_service_w_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_request.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_response.rb +12 -11
- data/lib/ruby_smb/dcerpc/svcctl/query_service_status_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl/service_status.rb +9 -8
- data/lib/ruby_smb/dcerpc/svcctl/start_service_w_request.rb +3 -3
- data/lib/ruby_smb/dcerpc/svcctl/start_service_w_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/svcctl.rb +1 -3
- data/lib/ruby_smb/dcerpc/uuid.rb +3 -0
- data/lib/ruby_smb/dcerpc/winreg/close_key_response.rb +2 -2
- data/lib/ruby_smb/dcerpc/winreg/create_key_request.rb +2 -13
- data/lib/ruby_smb/dcerpc/winreg/create_key_response.rb +3 -3
- data/lib/ruby_smb/dcerpc/winreg/enum_key_request.rb +3 -20
- data/lib/ruby_smb/dcerpc/winreg/enum_key_response.rb +3 -20
- data/lib/ruby_smb/dcerpc/winreg/enum_value_request.rb +5 -14
- data/lib/ruby_smb/dcerpc/winreg/enum_value_response.rb +5 -14
- data/lib/ruby_smb/dcerpc/winreg/open_key_request.rb +1 -9
- data/lib/ruby_smb/dcerpc/winreg/open_key_response.rb +4 -3
- data/lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb +5 -6
- data/lib/ruby_smb/dcerpc/winreg/open_root_key_response.rb +2 -2
- data/lib/ruby_smb/dcerpc/winreg/query_info_key_response.rb +9 -18
- data/lib/ruby_smb/dcerpc/winreg/query_value_request.rb +4 -14
- data/lib/ruby_smb/dcerpc/winreg/query_value_response.rb +7 -15
- data/lib/ruby_smb/dcerpc/winreg/regsam.rb +3 -1
- data/lib/ruby_smb/dcerpc/winreg/save_key_request.rb +0 -9
- data/lib/ruby_smb/dcerpc/winreg/save_key_response.rb +1 -1
- data/lib/ruby_smb/dcerpc/winreg.rb +10 -14
- data/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_request.rb +26 -0
- data/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_response.rb +88 -0
- data/lib/ruby_smb/dcerpc/wkssvc.rb +65 -0
- data/lib/ruby_smb/dcerpc.rb +41 -11
- data/lib/ruby_smb/field/file_time.rb +1 -1
- data/lib/ruby_smb/field/nt_status.rb +20 -1
- data/lib/ruby_smb/field/string16.rb +5 -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/ntlm.rb +18 -2
- data/lib/ruby_smb/server/server_client/negotiation.rb +1 -2
- data/lib/ruby_smb/server/server_client/session_setup.rb +44 -33
- 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 -25
- 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/pipe.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/pipe.rb +4 -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/client_spec.rb +1 -2
- data/spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb +69 -41
- data/spec/lib/ruby_smb/dcerpc/bind_spec.rb +75 -21
- data/spec/lib/ruby_smb/dcerpc/client_spec.rb +714 -0
- data/spec/lib/ruby_smb/dcerpc/drsr_spec.rb +2169 -0
- data/spec/lib/ruby_smb/dcerpc/ndr_spec.rb +3792 -1373
- data/spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_request_spec.rb +4 -4
- data/spec/lib/ruby_smb/dcerpc/netlogon/netr_server_password_set2_request_spec.rb +4 -4
- data/spec/lib/ruby_smb/dcerpc/netlogon/netr_server_req_challenge_request_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/netlogon/netr_server_req_challenge_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/p_syntax_id_t_spec.rb +18 -4
- data/spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb +27 -1
- data/spec/lib/ruby_smb/dcerpc/request_spec.rb +76 -11
- data/spec/lib/ruby_smb/dcerpc/response_spec.rb +99 -9
- data/spec/lib/ruby_smb/dcerpc/rpc_auth3_spec.rb +75 -0
- data/spec/lib/ruby_smb/dcerpc/rpc_security_attributes_spec.rb +29 -28
- data/spec/lib/ruby_smb/dcerpc/rrp_rpc_unicode_string_spec.rb +340 -0
- data/spec/lib/ruby_smb/dcerpc/samr/rpc_sid_spec.rb +116 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_close_handle_request_spec.rb +40 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_close_handle_response_spec.rb +48 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_connect_request_spec.rb +56 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_connect_response_spec.rb +47 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_request_spec.rb +63 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_response_spec.rb +265 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_request_spec.rb +52 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_response_spec.rb +36 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_open_domain_request_spec.rb +56 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_open_domain_response_spec.rb +48 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_request_spec.rb +48 -0
- data/spec/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_response_spec.rb +42 -0
- data/spec/lib/ruby_smb/dcerpc/samr_spec.rb +420 -0
- data/spec/lib/ruby_smb/dcerpc/sec_trailer_spec.rb +92 -0
- data/spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb +149 -110
- data/spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb +21 -17
- data/spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request_spec.rb +56 -79
- data/spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_response_spec.rb +4 -4
- data/spec/lib/ruby_smb/dcerpc/svcctl/close_service_handle_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl/control_service_request_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl/control_service_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request_spec.rb +19 -29
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_request_spec.rb +9 -15
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_request_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_response_spec.rb +22 -22
- data/spec/lib/ruby_smb/dcerpc/svcctl/query_service_status_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl/service_status_spec.rb +18 -14
- data/spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_request_spec.rb +5 -4
- data/spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/svcctl_spec.rb +1 -5
- data/spec/lib/ruby_smb/dcerpc/uuid_spec.rb +15 -23
- data/spec/lib/ruby_smb/dcerpc/winreg/close_key_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/winreg/create_key_request_spec.rb +4 -41
- data/spec/lib/ruby_smb/dcerpc/winreg/create_key_response_spec.rb +4 -4
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_key_request_spec.rb +4 -52
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_key_response_spec.rb +4 -56
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_value_request_spec.rb +10 -34
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_value_response_spec.rb +10 -34
- data/spec/lib/ruby_smb/dcerpc/winreg/open_key_request_spec.rb +2 -26
- data/spec/lib/ruby_smb/dcerpc/winreg/open_key_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/winreg/open_root_key_request_spec.rb +17 -25
- data/spec/lib/ruby_smb/dcerpc/winreg/open_root_key_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/winreg/query_info_key_response_spec.rb +20 -44
- data/spec/lib/ruby_smb/dcerpc/winreg/query_value_request_spec.rb +8 -32
- data/spec/lib/ruby_smb/dcerpc/winreg/query_value_response_spec.rb +10 -22
- data/spec/lib/ruby_smb/dcerpc/winreg/regsam_spec.rb +4 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/save_key_request_spec.rb +0 -12
- data/spec/lib/ruby_smb/dcerpc/winreg/save_key_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/winreg_spec.rb +18 -47
- data/spec/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_request_spec.rb +43 -0
- data/spec/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_response_spec.rb +410 -0
- data/spec/lib/ruby_smb/dcerpc/wkssvc_spec.rb +70 -0
- data/spec/lib/ruby_smb/field/nt_status_spec.rb +6 -2
- data/spec/lib/ruby_smb/field/string16_spec.rb +22 -0
- data/spec/lib/ruby_smb/gss/provider/ntlm/authenticator_spec.rb +4 -0
- data/spec/lib/ruby_smb/gss/provider/ntlm/os_version_spec.rb +1 -1
- 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/smb1/pipe_spec.rb +18 -37
- 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/spec/lib/ruby_smb/smb2/pipe_spec.rb +18 -16
- data/spec/support/bin_helper.rb +9 -0
- data.tar.gz.sig +2 -3
- metadata +129 -10
- metadata.gz.sig +0 -0
- data/lib/ruby_smb/dcerpc/rrp_unicode_string.rb +0 -38
- data/lib/ruby_smb/smb1/create_actions.rb +0 -20
- data/spec/lib/ruby_smb/dcerpc/rrp_unicode_string_spec.rb +0 -135
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:
|
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:
|
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
|
@@ -261,8 +261,12 @@ files:
|
|
261
261
|
- examples/auth_capture.rb
|
262
262
|
- examples/authenticate.rb
|
263
263
|
- examples/delete_file.rb
|
264
|
+
- examples/dump_secrets_from_sid.rb
|
265
|
+
- examples/enum_domain_users.rb
|
264
266
|
- examples/enum_registry_key.rb
|
265
267
|
- examples/enum_registry_values.rb
|
268
|
+
- examples/file_server.rb
|
269
|
+
- examples/get_computer_info.rb
|
266
270
|
- examples/list_directory.rb
|
267
271
|
- examples/negotiate.rb
|
268
272
|
- examples/negotiate_with_netbios_service.rb
|
@@ -286,10 +290,28 @@ files:
|
|
286
290
|
- lib/ruby_smb/client/winreg.rb
|
287
291
|
- lib/ruby_smb/compression.rb
|
288
292
|
- lib/ruby_smb/compression/lznt1.rb
|
293
|
+
- lib/ruby_smb/create_actions.rb
|
289
294
|
- lib/ruby_smb/crypto.rb
|
290
295
|
- lib/ruby_smb/dcerpc.rb
|
291
296
|
- lib/ruby_smb/dcerpc/bind.rb
|
292
297
|
- lib/ruby_smb/dcerpc/bind_ack.rb
|
298
|
+
- lib/ruby_smb/dcerpc/client.rb
|
299
|
+
- lib/ruby_smb/dcerpc/drsr.rb
|
300
|
+
- lib/ruby_smb/dcerpc/drsr/drs_bind_request.rb
|
301
|
+
- lib/ruby_smb/dcerpc/drsr/drs_bind_response.rb
|
302
|
+
- lib/ruby_smb/dcerpc/drsr/drs_crack_names_request.rb
|
303
|
+
- lib/ruby_smb/dcerpc/drsr/drs_crack_names_response.rb
|
304
|
+
- lib/ruby_smb/dcerpc/drsr/drs_domain_controller_info_request.rb
|
305
|
+
- lib/ruby_smb/dcerpc/drsr/drs_domain_controller_info_response.rb
|
306
|
+
- lib/ruby_smb/dcerpc/drsr/drs_extensions.rb
|
307
|
+
- lib/ruby_smb/dcerpc/drsr/drs_get_nc_changes_request.rb
|
308
|
+
- lib/ruby_smb/dcerpc/drsr/drs_get_nc_changes_response.rb
|
309
|
+
- lib/ruby_smb/dcerpc/drsr/drs_unbind_request.rb
|
310
|
+
- lib/ruby_smb/dcerpc/drsr/drs_unbind_response.rb
|
311
|
+
- lib/ruby_smb/dcerpc/epm.rb
|
312
|
+
- lib/ruby_smb/dcerpc/epm/epm_ept_map_request.rb
|
313
|
+
- lib/ruby_smb/dcerpc/epm/epm_ept_map_response.rb
|
314
|
+
- lib/ruby_smb/dcerpc/epm/epm_twrt.rb
|
293
315
|
- lib/ruby_smb/dcerpc/error.rb
|
294
316
|
- lib/ruby_smb/dcerpc/ndr.rb
|
295
317
|
- lib/ruby_smb/dcerpc/netlogon.rb
|
@@ -304,8 +326,30 @@ files:
|
|
304
326
|
- lib/ruby_smb/dcerpc/ptypes.rb
|
305
327
|
- lib/ruby_smb/dcerpc/request.rb
|
306
328
|
- lib/ruby_smb/dcerpc/response.rb
|
329
|
+
- lib/ruby_smb/dcerpc/rpc_auth3.rb
|
307
330
|
- lib/ruby_smb/dcerpc/rpc_security_attributes.rb
|
308
|
-
- lib/ruby_smb/dcerpc/
|
331
|
+
- lib/ruby_smb/dcerpc/rrp_rpc_unicode_string.rb
|
332
|
+
- lib/ruby_smb/dcerpc/samr.rb
|
333
|
+
- lib/ruby_smb/dcerpc/samr/rpc_sid.rb
|
334
|
+
- lib/ruby_smb/dcerpc/samr/samr_close_handle_request.rb
|
335
|
+
- lib/ruby_smb/dcerpc/samr/samr_close_handle_response.rb
|
336
|
+
- lib/ruby_smb/dcerpc/samr/samr_connect_request.rb
|
337
|
+
- lib/ruby_smb/dcerpc/samr/samr_connect_response.rb
|
338
|
+
- lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_request.rb
|
339
|
+
- lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_response.rb
|
340
|
+
- lib/ruby_smb/dcerpc/samr/samr_get_alias_membership_request.rb
|
341
|
+
- lib/ruby_smb/dcerpc/samr/samr_get_alias_membership_response.rb
|
342
|
+
- lib/ruby_smb/dcerpc/samr/samr_get_groups_for_user_request.rb
|
343
|
+
- lib/ruby_smb/dcerpc/samr/samr_get_groups_for_user_response.rb
|
344
|
+
- lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_request.rb
|
345
|
+
- lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_response.rb
|
346
|
+
- lib/ruby_smb/dcerpc/samr/samr_open_domain_request.rb
|
347
|
+
- lib/ruby_smb/dcerpc/samr/samr_open_domain_response.rb
|
348
|
+
- lib/ruby_smb/dcerpc/samr/samr_open_user_request.rb
|
349
|
+
- lib/ruby_smb/dcerpc/samr/samr_open_user_response.rb
|
350
|
+
- lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_request.rb
|
351
|
+
- lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_response.rb
|
352
|
+
- lib/ruby_smb/dcerpc/sec_trailer.rb
|
309
353
|
- lib/ruby_smb/dcerpc/srvsvc.rb
|
310
354
|
- lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all.rb
|
311
355
|
- lib/ruby_smb/dcerpc/svcctl.rb
|
@@ -347,6 +391,9 @@ files:
|
|
347
391
|
- lib/ruby_smb/dcerpc/winreg/regsam.rb
|
348
392
|
- lib/ruby_smb/dcerpc/winreg/save_key_request.rb
|
349
393
|
- lib/ruby_smb/dcerpc/winreg/save_key_response.rb
|
394
|
+
- lib/ruby_smb/dcerpc/wkssvc.rb
|
395
|
+
- lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_request.rb
|
396
|
+
- lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_response.rb
|
350
397
|
- lib/ruby_smb/dialect.rb
|
351
398
|
- lib/ruby_smb/dispatcher.rb
|
352
399
|
- lib/ruby_smb/dispatcher/base.rb
|
@@ -375,11 +422,17 @@ files:
|
|
375
422
|
- lib/ruby_smb/fscc/file_information/file_both_directory_information.rb
|
376
423
|
- lib/ruby_smb/fscc/file_information/file_directory_information.rb
|
377
424
|
- lib/ruby_smb/fscc/file_information/file_disposition_information.rb
|
425
|
+
- lib/ruby_smb/fscc/file_information/file_ea_information.rb
|
378
426
|
- lib/ruby_smb/fscc/file_information/file_full_directory_information.rb
|
379
427
|
- lib/ruby_smb/fscc/file_information/file_id_both_directory_information.rb
|
380
428
|
- lib/ruby_smb/fscc/file_information/file_id_full_directory_information.rb
|
381
429
|
- lib/ruby_smb/fscc/file_information/file_names_information.rb
|
430
|
+
- lib/ruby_smb/fscc/file_information/file_network_open_information.rb
|
382
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
|
383
436
|
- lib/ruby_smb/generic_packet.rb
|
384
437
|
- lib/ruby_smb/gss.rb
|
385
438
|
- lib/ruby_smb/gss/provider.rb
|
@@ -396,6 +449,14 @@ files:
|
|
396
449
|
- lib/ruby_smb/server/server_client.rb
|
397
450
|
- lib/ruby_smb/server/server_client/negotiation.rb
|
398
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
|
399
460
|
- lib/ruby_smb/signing.rb
|
400
461
|
- lib/ruby_smb/smb1.rb
|
401
462
|
- lib/ruby_smb/smb1/andx_block.rb
|
@@ -420,7 +481,6 @@ files:
|
|
420
481
|
- lib/ruby_smb/smb1/bit_field/trans_flags.rb
|
421
482
|
- lib/ruby_smb/smb1/bit_field/tree_connect_flags.rb
|
422
483
|
- lib/ruby_smb/smb1/commands.rb
|
423
|
-
- lib/ruby_smb/smb1/create_actions.rb
|
424
484
|
- lib/ruby_smb/smb1/data_block.rb
|
425
485
|
- lib/ruby_smb/smb1/dialect.rb
|
426
486
|
- lib/ruby_smb/smb1/file.rb
|
@@ -499,6 +559,8 @@ files:
|
|
499
559
|
- lib/ruby_smb/smb2/bit_field/smb2_security_mode_single.rb
|
500
560
|
- lib/ruby_smb/smb2/commands.rb
|
501
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
|
502
564
|
- lib/ruby_smb/smb2/file.rb
|
503
565
|
- lib/ruby_smb/smb2/info_type.rb
|
504
566
|
- lib/ruby_smb/smb2/negotiate_context.rb
|
@@ -519,6 +581,8 @@ files:
|
|
519
581
|
- lib/ruby_smb/smb2/packet/negotiate_response.rb
|
520
582
|
- lib/ruby_smb/smb2/packet/query_directory_request.rb
|
521
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
|
522
586
|
- lib/ruby_smb/smb2/packet/read_request.rb
|
523
587
|
- lib/ruby_smb/smb2/packet/read_response.rb
|
524
588
|
- lib/ruby_smb/smb2/packet/session_setup_request.rb
|
@@ -535,6 +599,7 @@ files:
|
|
535
599
|
- lib/ruby_smb/smb2/pipe.rb
|
536
600
|
- lib/ruby_smb/smb2/smb2_header.rb
|
537
601
|
- lib/ruby_smb/smb2/tree.rb
|
602
|
+
- lib/ruby_smb/smb_error.rb
|
538
603
|
- lib/ruby_smb/version.rb
|
539
604
|
- ruby_smb.gemspec
|
540
605
|
- spec/lib/ruby_smb/client_spec.rb
|
@@ -542,6 +607,8 @@ files:
|
|
542
607
|
- spec/lib/ruby_smb/crypto_spec.rb
|
543
608
|
- spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
|
544
609
|
- spec/lib/ruby_smb/dcerpc/bind_spec.rb
|
610
|
+
- spec/lib/ruby_smb/dcerpc/client_spec.rb
|
611
|
+
- spec/lib/ruby_smb/dcerpc/drsr_spec.rb
|
545
612
|
- spec/lib/ruby_smb/dcerpc/ndr_spec.rb
|
546
613
|
- spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_request_spec.rb
|
547
614
|
- spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_response_spec.rb
|
@@ -553,8 +620,24 @@ files:
|
|
553
620
|
- spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
|
554
621
|
- spec/lib/ruby_smb/dcerpc/request_spec.rb
|
555
622
|
- spec/lib/ruby_smb/dcerpc/response_spec.rb
|
623
|
+
- spec/lib/ruby_smb/dcerpc/rpc_auth3_spec.rb
|
556
624
|
- spec/lib/ruby_smb/dcerpc/rpc_security_attributes_spec.rb
|
557
|
-
- spec/lib/ruby_smb/dcerpc/
|
625
|
+
- spec/lib/ruby_smb/dcerpc/rrp_rpc_unicode_string_spec.rb
|
626
|
+
- spec/lib/ruby_smb/dcerpc/samr/rpc_sid_spec.rb
|
627
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_close_handle_request_spec.rb
|
628
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_close_handle_response_spec.rb
|
629
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_connect_request_spec.rb
|
630
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_connect_response_spec.rb
|
631
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_request_spec.rb
|
632
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_response_spec.rb
|
633
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_request_spec.rb
|
634
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_response_spec.rb
|
635
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_open_domain_request_spec.rb
|
636
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_open_domain_response_spec.rb
|
637
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_request_spec.rb
|
638
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_response_spec.rb
|
639
|
+
- spec/lib/ruby_smb/dcerpc/samr_spec.rb
|
640
|
+
- spec/lib/ruby_smb/dcerpc/sec_trailer_spec.rb
|
558
641
|
- spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb
|
559
642
|
- spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb
|
560
643
|
- spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request_spec.rb
|
@@ -596,6 +679,9 @@ files:
|
|
596
679
|
- spec/lib/ruby_smb/dcerpc/winreg/save_key_request_spec.rb
|
597
680
|
- spec/lib/ruby_smb/dcerpc/winreg/save_key_response_spec.rb
|
598
681
|
- spec/lib/ruby_smb/dcerpc/winreg_spec.rb
|
682
|
+
- spec/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_request_spec.rb
|
683
|
+
- spec/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_response_spec.rb
|
684
|
+
- spec/lib/ruby_smb/dcerpc/wkssvc_spec.rb
|
599
685
|
- spec/lib/ruby_smb/dcerpc_spec.rb
|
600
686
|
- spec/lib/ruby_smb/dispatcher/base_spec.rb
|
601
687
|
- spec/lib/ruby_smb/dispatcher/socket_spec.rb
|
@@ -609,6 +695,7 @@ files:
|
|
609
695
|
- spec/lib/ruby_smb/field/smb_fea_spec.rb
|
610
696
|
- spec/lib/ruby_smb/field/smb_gea_list_spec.rb
|
611
697
|
- spec/lib/ruby_smb/field/smb_gea_spec.rb
|
698
|
+
- spec/lib/ruby_smb/field/string16_spec.rb
|
612
699
|
- spec/lib/ruby_smb/field/stringz16_spec.rb
|
613
700
|
- spec/lib/ruby_smb/field/utime_spec.rb
|
614
701
|
- spec/lib/ruby_smb/fscc/ea_info_array_spec.rb
|
@@ -632,6 +719,10 @@ files:
|
|
632
719
|
- spec/lib/ruby_smb/nbss/session_header_spec.rb
|
633
720
|
- spec/lib/ruby_smb/nbss/session_request_spec.rb
|
634
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
|
635
726
|
- spec/lib/ruby_smb/server_spec.rb
|
636
727
|
- spec/lib/ruby_smb/smb1/andx_block_spec.rb
|
637
728
|
- spec/lib/ruby_smb/smb1/bit_field/capabilities_spec.rb
|
@@ -715,7 +806,7 @@ files:
|
|
715
806
|
- spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb
|
716
807
|
- spec/lib/ruby_smb/smb2/bit_field/smb2_capabilities_spec.rb
|
717
808
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
718
|
-
- spec/lib/ruby_smb/smb2/
|
809
|
+
- spec/lib/ruby_smb/smb2/create_context/create_context_request_spec.rb
|
719
810
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
720
811
|
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
721
812
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
@@ -751,6 +842,7 @@ files:
|
|
751
842
|
- spec/lib/ruby_smb/smb2/tree_spec.rb
|
752
843
|
- spec/lib/ruby_smb_spec.rb
|
753
844
|
- spec/spec_helper.rb
|
845
|
+
- spec/support/bin_helper.rb
|
754
846
|
- spec/support/mock_socket_dispatcher.rb
|
755
847
|
- spec/support/shared/examples/bit_field_single_flag.rb
|
756
848
|
homepage: https://github.com/rapid7/ruby_smb
|
@@ -783,6 +875,8 @@ test_files:
|
|
783
875
|
- spec/lib/ruby_smb/crypto_spec.rb
|
784
876
|
- spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
|
785
877
|
- spec/lib/ruby_smb/dcerpc/bind_spec.rb
|
878
|
+
- spec/lib/ruby_smb/dcerpc/client_spec.rb
|
879
|
+
- spec/lib/ruby_smb/dcerpc/drsr_spec.rb
|
786
880
|
- spec/lib/ruby_smb/dcerpc/ndr_spec.rb
|
787
881
|
- spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_request_spec.rb
|
788
882
|
- spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_response_spec.rb
|
@@ -794,8 +888,24 @@ test_files:
|
|
794
888
|
- spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
|
795
889
|
- spec/lib/ruby_smb/dcerpc/request_spec.rb
|
796
890
|
- spec/lib/ruby_smb/dcerpc/response_spec.rb
|
891
|
+
- spec/lib/ruby_smb/dcerpc/rpc_auth3_spec.rb
|
797
892
|
- spec/lib/ruby_smb/dcerpc/rpc_security_attributes_spec.rb
|
798
|
-
- spec/lib/ruby_smb/dcerpc/
|
893
|
+
- spec/lib/ruby_smb/dcerpc/rrp_rpc_unicode_string_spec.rb
|
894
|
+
- spec/lib/ruby_smb/dcerpc/samr/rpc_sid_spec.rb
|
895
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_close_handle_request_spec.rb
|
896
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_close_handle_response_spec.rb
|
897
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_connect_request_spec.rb
|
898
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_connect_response_spec.rb
|
899
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_request_spec.rb
|
900
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_enumerate_users_in_domain_response_spec.rb
|
901
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_request_spec.rb
|
902
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_lookup_domain_in_sam_server_response_spec.rb
|
903
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_open_domain_request_spec.rb
|
904
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_open_domain_response_spec.rb
|
905
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_request_spec.rb
|
906
|
+
- spec/lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_response_spec.rb
|
907
|
+
- spec/lib/ruby_smb/dcerpc/samr_spec.rb
|
908
|
+
- spec/lib/ruby_smb/dcerpc/sec_trailer_spec.rb
|
799
909
|
- spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb
|
800
910
|
- spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb
|
801
911
|
- spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request_spec.rb
|
@@ -837,6 +947,9 @@ test_files:
|
|
837
947
|
- spec/lib/ruby_smb/dcerpc/winreg/save_key_request_spec.rb
|
838
948
|
- spec/lib/ruby_smb/dcerpc/winreg/save_key_response_spec.rb
|
839
949
|
- spec/lib/ruby_smb/dcerpc/winreg_spec.rb
|
950
|
+
- spec/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_request_spec.rb
|
951
|
+
- spec/lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_response_spec.rb
|
952
|
+
- spec/lib/ruby_smb/dcerpc/wkssvc_spec.rb
|
840
953
|
- spec/lib/ruby_smb/dcerpc_spec.rb
|
841
954
|
- spec/lib/ruby_smb/dispatcher/base_spec.rb
|
842
955
|
- spec/lib/ruby_smb/dispatcher/socket_spec.rb
|
@@ -850,6 +963,7 @@ test_files:
|
|
850
963
|
- spec/lib/ruby_smb/field/smb_fea_spec.rb
|
851
964
|
- spec/lib/ruby_smb/field/smb_gea_list_spec.rb
|
852
965
|
- spec/lib/ruby_smb/field/smb_gea_spec.rb
|
966
|
+
- spec/lib/ruby_smb/field/string16_spec.rb
|
853
967
|
- spec/lib/ruby_smb/field/stringz16_spec.rb
|
854
968
|
- spec/lib/ruby_smb/field/utime_spec.rb
|
855
969
|
- spec/lib/ruby_smb/fscc/ea_info_array_spec.rb
|
@@ -873,6 +987,10 @@ test_files:
|
|
873
987
|
- spec/lib/ruby_smb/nbss/session_header_spec.rb
|
874
988
|
- spec/lib/ruby_smb/nbss/session_request_spec.rb
|
875
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
|
876
994
|
- spec/lib/ruby_smb/server_spec.rb
|
877
995
|
- spec/lib/ruby_smb/smb1/andx_block_spec.rb
|
878
996
|
- spec/lib/ruby_smb/smb1/bit_field/capabilities_spec.rb
|
@@ -956,7 +1074,7 @@ test_files:
|
|
956
1074
|
- spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb
|
957
1075
|
- spec/lib/ruby_smb/smb2/bit_field/smb2_capabilities_spec.rb
|
958
1076
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
959
|
-
- spec/lib/ruby_smb/smb2/
|
1077
|
+
- spec/lib/ruby_smb/smb2/create_context/create_context_request_spec.rb
|
960
1078
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
961
1079
|
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
962
1080
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
@@ -992,5 +1110,6 @@ test_files:
|
|
992
1110
|
- spec/lib/ruby_smb/smb2/tree_spec.rb
|
993
1111
|
- spec/lib/ruby_smb_spec.rb
|
994
1112
|
- spec/spec_helper.rb
|
1113
|
+
- spec/support/bin_helper.rb
|
995
1114
|
- spec/support/mock_socket_dispatcher.rb
|
996
1115
|
- spec/support/shared/examples/bit_field_single_flag.rb
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'ruby_smb/dcerpc/ndr'
|
2
|
-
|
3
|
-
module RubySMB
|
4
|
-
module Dcerpc
|
5
|
-
|
6
|
-
# A RRP_UNICODE_STRING structure as defined in
|
7
|
-
# [2.2.4 RRP_UNICODE_STRING](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rrp/c0c90f11-a4c4-496a-ac09-8a8a3697ceef)
|
8
|
-
class RrpUnicodeString < BinData::Primitive
|
9
|
-
endian :little
|
10
|
-
|
11
|
-
uint16 :buffer_length
|
12
|
-
uint16 :maximum_length
|
13
|
-
ndr_lp_str :buffer
|
14
|
-
|
15
|
-
def get
|
16
|
-
self.buffer
|
17
|
-
end
|
18
|
-
|
19
|
-
def set(buf)
|
20
|
-
self.buffer = buf
|
21
|
-
self.buffer_length = self.buffer == :null ? 0 : self.buffer.referent.actual_count * 2
|
22
|
-
# Don't reset maximum_length if the buffer is NULL to make sure we can
|
23
|
-
# set it independently of the buffer size
|
24
|
-
return if self.maximum_length > 0 && self.buffer == :null
|
25
|
-
self.maximum_length = self.buffer.referent.max_count * 2
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
# A pointer to a RRP_UNICODE_STRING structure
|
30
|
-
class PrrpUnicodeString < Ndr::NdrPointer
|
31
|
-
endian :little
|
32
|
-
|
33
|
-
rrp_unicode_string :referent, onlyif: -> { self.referent_id != 0 }
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
@@ -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
|
@@ -1,135 +0,0 @@
|
|
1
|
-
RSpec.describe RubySMB::Dcerpc::RrpUnicodeString do
|
2
|
-
subject(:packet) { described_class.new }
|
3
|
-
|
4
|
-
it { is_expected.to respond_to :buffer_length }
|
5
|
-
it { is_expected.to respond_to :maximum_length }
|
6
|
-
it { is_expected.to respond_to :buffer }
|
7
|
-
|
8
|
-
it 'is little endian' do
|
9
|
-
expect(described_class.fields.instance_variable_get(:@hints)[:endian]).to eq :little
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#buffer_length' do
|
13
|
-
it 'should be a 16-bit unsigned integer' do
|
14
|
-
expect(packet.buffer_length).to be_a BinData::Uint16le
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#maximum_length' do
|
19
|
-
it 'should be a 16-bit unsigned integer' do
|
20
|
-
expect(packet.maximum_length).to be_a BinData::Uint16le
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#buffer' do
|
25
|
-
it 'should be a NdrLpStr' do
|
26
|
-
expect(packet.buffer).to be_a RubySMB::Dcerpc::Ndr::NdrLpStr
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#get' do
|
31
|
-
it 'returns #buffer' do
|
32
|
-
packet.buffer = 'spec_test'
|
33
|
-
expect(packet.get).to eq(RubySMB::Dcerpc::Ndr::NdrLpStr.new('spec_test'))
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
describe '#set' do
|
38
|
-
it 'sets #buffer to the expected value' do
|
39
|
-
packet.set('spec_test')
|
40
|
-
expect(packet.buffer).to eq(RubySMB::Dcerpc::Ndr::NdrLpStr.new('spec_test'))
|
41
|
-
end
|
42
|
-
|
43
|
-
it 'sets #buffer_length to the expected value' do
|
44
|
-
packet.set('spec_test')
|
45
|
-
expect(packet.buffer_length).to eq(('spec_test'.size + 1) * 2)
|
46
|
-
end
|
47
|
-
|
48
|
-
it 'sets #maximum_length to the expected value' do
|
49
|
-
packet.set('spec_test')
|
50
|
-
expect(packet.maximum_length).to eq(('spec_test'.size + 1) * 2)
|
51
|
-
end
|
52
|
-
|
53
|
-
context 'when the value is :null' do
|
54
|
-
it 'sets #buffer_length to 0' do
|
55
|
-
packet.buffer_length = 33
|
56
|
-
packet.set(:null)
|
57
|
-
expect(packet.buffer_length).to eq(0)
|
58
|
-
end
|
59
|
-
|
60
|
-
it 'does not set #maximum_length if it has already been set' do
|
61
|
-
packet.maximum_length = 33
|
62
|
-
packet.set(:null)
|
63
|
-
expect(packet.maximum_length).to eq(33)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
describe '#read' do
|
69
|
-
context 'with a null pointer' do
|
70
|
-
it 'reads its own binary representation' do
|
71
|
-
raw = packet.to_binary_s
|
72
|
-
expect(described_class.read(raw)).to eq(packet)
|
73
|
-
expect(described_class.read(raw).to_binary_s).to eq(raw)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
context 'with a normal string' do
|
78
|
-
it 'reads its own binary representation' do
|
79
|
-
packet.assign('my_test')
|
80
|
-
raw = packet.to_binary_s
|
81
|
-
expect(described_class.read(raw)).to eq(packet)
|
82
|
-
expect(described_class.read(raw).to_binary_s).to eq(raw)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
RSpec.describe RubySMB::Dcerpc::PrrpUnicodeString do
|
89
|
-
it 'is NdrPointer subclass' do
|
90
|
-
expect(described_class).to be < RubySMB::Dcerpc::Ndr::NdrPointer
|
91
|
-
end
|
92
|
-
|
93
|
-
subject(:packet) { described_class.new }
|
94
|
-
|
95
|
-
it { is_expected.to respond_to :referent }
|
96
|
-
|
97
|
-
it 'is little endian' do
|
98
|
-
expect(described_class.fields.instance_variable_get(:@hints)[:endian]).to eq :little
|
99
|
-
end
|
100
|
-
|
101
|
-
describe '#referent' do
|
102
|
-
it 'is a RrpUnicodeString' do
|
103
|
-
expect(packet.referent).to be_a RubySMB::Dcerpc::RrpUnicodeString
|
104
|
-
end
|
105
|
-
|
106
|
-
it 'exists if superclass #referent_identifier is not zero' do
|
107
|
-
packet.referent_id = 0xCCCC
|
108
|
-
expect(packet.referent?).to be true
|
109
|
-
end
|
110
|
-
|
111
|
-
it 'does not exist if superclass #referent_identifier is zero' do
|
112
|
-
packet.referent_id = 0
|
113
|
-
expect(packet.referent?).to be false
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
describe '#read' do
|
118
|
-
context 'with a null pointer' do
|
119
|
-
it 'reads its own binary representation' do
|
120
|
-
raw = packet.to_binary_s
|
121
|
-
expect(described_class.read(raw)).to eq(packet)
|
122
|
-
expect(described_class.read(raw).to_binary_s).to eq(raw)
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
context 'with a normal string' do
|
127
|
-
it 'reads its own binary representation' do
|
128
|
-
packet.assign('my_test')
|
129
|
-
raw = packet.to_binary_s
|
130
|
-
expect(described_class.read(raw)).to eq(packet)
|
131
|
-
expect(described_class.read(raw).to_binary_s).to eq(raw)
|
132
|
-
end
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|