ruby_smb 3.3.21 → 3.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ruby_smb/client/authentication.rb +2 -1
- data/lib/ruby_smb/version.rb +1 -1
- data/spec/lib/ruby_smb/client_spec.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef6a12241de5bf3b7f37028f5dd927f1bc71249e37c77f2bb8d1575836bc9889
|
|
4
|
+
data.tar.gz: 624c0708b392f448c17d163b71ef821902d83d17f5f632d7416f6a691041bb79
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b518493f293005ce5b805221625a03cb937d7b2218029824f5cabb577f70cfdf8a1cd6ed6b08b6fc75a57c490200c20b469b8e347a3625d4e633f716d05929c
|
|
7
|
+
data.tar.gz: 92e4ce7a72b4d7c8b9f140df9bb94e8798810f9ec0491bff81c295e68b0ebc07b17bd1f0c72e38cc7f8a2fb86ae14b08065296d83969adfe99b22038a1c24f33
|
|
@@ -99,7 +99,8 @@ module RubySMB
|
|
|
99
99
|
response = smb1_ntlmssp_final_packet(raw)
|
|
100
100
|
response_code = response.status_code
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
# Use the UID from the final response (some servers, e.g. Samba, reassign it on success).
|
|
103
|
+
@user_id = response.smb_header.uid if response_code == WindowsError::NTStatus::STATUS_SUCCESS
|
|
103
104
|
|
|
104
105
|
response_code
|
|
105
106
|
end
|
data/lib/ruby_smb/version.rb
CHANGED
|
@@ -1619,11 +1619,13 @@ RSpec.describe RubySMB::Client do
|
|
|
1619
1619
|
expect(smb1_client.os_version).to eq '6.1.7601'
|
|
1620
1620
|
end
|
|
1621
1621
|
|
|
1622
|
-
it 'stores the user ID if the status code is \'STATUS_SUCCESS\'' do
|
|
1622
|
+
it 'stores the user ID from the final response packet if the status code is \'STATUS_SUCCESS\'' do
|
|
1623
|
+
# Session UID must come from the final response, not the challenge (Samba reassigns it on success).
|
|
1623
1624
|
response_packet.smb_header.uid = user_id
|
|
1625
|
+
final_response_packet.smb_header.uid = user_id + 1
|
|
1624
1626
|
final_response_packet.smb_header.nt_status = WindowsError::NTStatus::STATUS_SUCCESS.value
|
|
1625
1627
|
smb1_client.smb1_authenticate
|
|
1626
|
-
expect(smb1_client.user_id).to eq user_id
|
|
1628
|
+
expect(smb1_client.user_id).to eq user_id + 1
|
|
1627
1629
|
end
|
|
1628
1630
|
|
|
1629
1631
|
it 'does not store the user ID if the status code is not \'STATUS_SUCCESS\'' do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_smb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.3.
|
|
4
|
+
version: 3.3.22
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Metasploit Hackers
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date: 2026-
|
|
16
|
+
date: 2026-07-31 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: redcarpet
|