Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
0831288
Correct parameter name in documentation
TalAloni Nov 19, 2021
027b465
Documentation syntax corrections
TalAloni Nov 19, 2021
02c4ab2
Documentation XML syntax corrections
TalAloni Nov 19, 2021
db007d0
SMBServer: Added private Start overload allowing to specify the liste…
TalAloni Dec 10, 2021
0ae5986
Client: Added private Connect overload allowing to specify the server…
TalAloni Dec 10, 2021
849b99a
Client: Correct NetrShareEnum ServerName syntax
TalAloni Dec 10, 2021
3c47285
SMBServer 1.4.7
TalAloni Dec 10, 2021
0099084
SMBServer: Start Bugfix
TalAloni Dec 10, 2021
6b2906b
SMBServer 1.4.8
TalAloni Dec 10, 2021
22247a8
Adding STATUS_PATH_NOT_COVERED = 0xC0000257 to NTStatus (#120)
jahales-etude Dec 27, 2021
5c4b88c
Update NTStatus.cs: Correct ordering
TalAloni Dec 27, 2021
f8baa1b
Fixes bug when trying to use local ip address as host name. (#133)
KieranDevvs May 27, 2022
1ac805a
SessionSetupHelper: Bugfix: Use correct sessionID for session creatio…
TalAloni May 27, 2022
9eba4f5
SessionSetupHelper: Bugfix: Trim session key if longer than 16 bytes
TalAloni May 27, 2022
b268988
Provide SPN with NTLMv2 token (#134)
jborean93 May 27, 2022
d6f6af4
Updated Readme.md
TalAloni May 27, 2022
de3ea8d
SSPIHelper: Code refactoring: Moved NTLM functionality to a separate …
TalAloni May 27, 2022
c197971
Server: SMB2: Correctly handle invalid SessionSetup request containin…
TalAloni Oct 28, 2022
de28e67
NTFileSystemAdapter: Avoid modifications of entries returned from IFi…
TalAloni Oct 28, 2022
921b672
SMBServer 1.4.9
TalAloni Oct 28, 2022
7d07f65
Client: Added IsConnected property
TalAloni Oct 28, 2022
d56a50c
Sets the socket address family to the one decided by the address pass…
KieranDevvs Nov 7, 2022
4aee674
Connect: Add private overload to set response timeout
TalAloni Mar 4, 2023
79486ff
Client: Allow reusing client instance
TalAloni Mar 4, 2023
3d420c5
Client: Prefer IPv4 when resolving DNS hostname
TalAloni Mar 4, 2023
23fbe4f
Added markdown code block highlighting for C# (#178)
cardboardboxpepe Apr 14, 2023
4c59c21
Server: Fix issue when GSSAPI SessionKey is null (#182)
gabe-k May 19, 2023
0416e56
NTLMCryptography: Add .NET 5.0 \ 6.0 support
TalAloni May 19, 2023
ecce6f9
SMBServer 1.5.0
TalAloni May 20, 2023
4c3d3b5
Added stream related methods to LittleEndianWriter.cs
TalAloni Jun 2, 2023
dd026cf
Client: Support anonymous login
TalAloni Jul 27, 2023
f5d5952
LittleEndianConverter: Remove unused using statement
TalAloni Jul 29, 2023
4fe937b
Remove unused using statements
TalAloni Jul 29, 2023
2e33492
Update Copyright property
TalAloni Jul 29, 2023
a0b0752
SMBLibrary: Increment version to 1.5.0.1
TalAloni Jul 29, 2023
3a7e36b
Client: Added API to provide custom authentication
TalAloni Oct 27, 2023
660442e
Client: Improve disconnection detection
TalAloni Oct 27, 2023
45dbf28
SMB2Client: Add ability to control response timeout (#232)
jtirjan Nov 9, 2023
4152ab4
SMBLibrary: Increment version to 1.5.0.2
TalAloni Nov 25, 2023
1554e2b
SMBLibrary: Increment version to 1.5.0.3
TalAloni Dec 11, 2023
d6a1497
Client: ConnectionState: Remove unused using statements
TalAloni Dec 14, 2023
9457796
NBTConnectionReceiveBuffer: Implement dispose pattern
TalAloni Dec 14, 2023
f3883fa
NBTConnectionReceiveBuffer: Use ArrayPool rent buffers
TalAloni Dec 14, 2023
b988c3f
Add access denied ace support (#236)
MohCraft Dec 14, 2023
0adfbd8
Update Visual Studio 2005 project file
TalAloni Dec 14, 2023
576c8c4
Remove Visual Studio 2005 Support
TalAloni Dec 22, 2023
dbfab05
Update Test project to MSTest v2
TalAloni Dec 22, 2023
c5b432e
Tests: Remove unused methods
TalAloni Dec 22, 2023
856a2cc
Update RPCTests
TalAloni Dec 22, 2023
a80c2d1
Server: Mark method allowing to set port as internal
TalAloni Dec 22, 2023
64721a2
Client: Mark method allowing to set port as internal
TalAloni Dec 22, 2023
989b051
Tests: Added LoginTests
TalAloni Dec 22, 2023
d62c591
Tests: LoginTests: Add test
TalAloni Dec 22, 2023
ce6921c
Client: ProcessConnectionBuffer: Improved logging
TalAloni Dec 30, 2023
a9f995c
NTLM: AuthenticateMessage: Added GetMicFieldOffset method and MicFiel…
TalAloni Dec 30, 2023
787df79
NTLMCryptography: Added ValidateAuthenticateMessageMIC method and upd…
TalAloni Dec 30, 2023
2b92e1b
Client: NTLMAuthenticationClient.GetAuthenticateMessage: Renamed vari…
TalAloni Dec 30, 2023
08748d3
NTLM: AuthenticateMessage: Add CalculateMIC method
TalAloni Dec 30, 2023
7628bb6
NTLM: NTLMAuthenticationClient: Store negotiate message as class vari…
TalAloni Dec 30, 2023
c090de0
NTLMCryptography: Minor styling change
TalAloni Dec 30, 2023
cb2c50a
NTLMCryptography: Add ComputeSignKey and ComputeSealKey methods and t…
TalAloni Dec 30, 2023
e31df2a
Client: Fix ArgumentNullException following recent ArrayPool usage
TalAloni Dec 30, 2023
d34f014
Server: Dispose of ReceiveBuffer after receiving invalid packets
TalAloni Dec 30, 2023
dad516b
NBTConnectionReceiveBuffer: Avoid exception when calling Dispose twice
TalAloni Dec 30, 2023
2667b54
GSSAPI: SimpleProtectedNegotiationTokenInit: Extracted GetEncodedMech…
TalAloni Jan 6, 2024
ca718e3
GSSAPI: SimpleProtectedNegotiationTokenInit: Add GetMechanismTypeList…
TalAloni Jan 6, 2024
39fa4cd
NTLMCryptography: Add ComputeMechListMIC method
TalAloni Jan 6, 2024
99ae36d
GetNegotiateMessage: Add negotiateMessageBytes parameter
TalAloni Jan 6, 2024
64aca73
NTLMAuthenticationHelper: Calculate Authentication message MIC
TalAloni Jan 6, 2024
8b11c57
SMB1Client: Add ability to control response timeout
TalAloni Jan 6, 2024
64a27f1
SMBLibrary 1.5.1
TalAloni Jan 6, 2024
3b683cd
Server: ServerService: correctly handle unsupported ShareEnum levels
TalAloni Jan 6, 2024
c284b05
SMBLibrary/Readme.md: Correct URL
TalAloni Jan 6, 2024
3938866
FileRenameInformationType2: Bugfix: Ensure length is at least 24 bytes
TalAloni Jan 17, 2024
f366c78
NBTConnectionReceiveBuffer: Dispose: Fix thread-safety issue
TalAloni Feb 5, 2024
b030500
SMBLibrary 1.5.1.1
TalAloni Feb 5, 2024
1827563
SMB1Client, SMB2Client: Disconnect: Invoke Socket.Close
TalAloni Feb 10, 2024
db1410b
SMBLibrary 1.5.1.2
TalAloni Feb 10, 2024
5dff387
Replace DiskAccessLibrary.FileSystems.Abstractions with NuGet package…
TalAloni Feb 17, 2024
a9f9ef9
SMB2Client: Support non-Microsoft servers returning MaxReadSize > Max…
TalAloni Mar 1, 2024
693269f
SMBLibrary 1.5.1.3
TalAloni Mar 1, 2024
dd7b945
SMBIServer: Use CancellationToken for send keep-alive thread if avail…
TalAloni Mar 9, 2024
cf182e7
Client: NetBIOS over TCP: Apply timeout set by the client instead of …
TalAloni Jun 1, 2024
1a8c94b
Server: ConnectionState: Fix thread-safety issue
TalAloni Jun 1, 2024
ac403ba
Server, Client: Fix thread-safety violations related to NBTConnection…
TalAloni Jun 2, 2024
fe22636
SMBServer: Delete unused variable
TalAloni Jun 2, 2024
8d7a6e0
Client: Removed unneeded connectivity check before invoking EndReceive
TalAloni Jun 3, 2024
28c114e
SMBLibrary 1.5.2
TalAloni Jun 5, 2024
6823b43
Server: SMBServer: Mark overloaded Start method as protected internal
TalAloni Jun 8, 2024
cfa568b
Client: Mark overloaded Start method as protected internal
TalAloni Jun 8, 2024
0618bff
Client: Improve client response time when server disconnects or retur…
TalAloni Jun 12, 2024
a2b96f6
Add missing copyright notices
TalAloni Jun 12, 2024
aeb8849
Client: Fix possible NullReferenceException when disconnection occur …
TalAloni Jun 12, 2024
4ca34f0
NTStatus: Add STATUS_IO_TIMEOUT
TalAloni Jun 12, 2024
d8b1791
Client: Add WaitForCommand overload
TalAloni Jun 12, 2024
7ecc9e6
SMB1FileStore, SMB2FileStore: Return STATUS_IO_TIMEOUT instead of STA…
TalAloni Jun 12, 2024
f446549
SMBLibrary 1.5.3
TalAloni Jun 25, 2024
390961f
SMB2: CreateResponse: Renamed variable
TalAloni Jul 6, 2024
c150a12
SMB2: CreateResponse: Minor code refactoring
TalAloni Jul 6, 2024
019015e
SMB2: CreateResponse: Bugfix: Write CreateContexts offset and Length
TalAloni Jul 6, 2024
3247f03
SMB2: CreateContext: Bugfix: Read and Write name as ANSI instead of U…
TalAloni Jul 6, 2024
773d423
SMB2: CreateContext: Bugfix: Correct Name and Data offset write location
TalAloni Jul 6, 2024
5c4e369
SMB2: CreateContext: Bugfix: Write DataLength
TalAloni Jul 6, 2024
b091285
Client: Update IsConnected on EndReceive socket exception
TalAloni Jul 27, 2024
42ea6a5
SMB2Client: Minor code refactoring
TalAloni Jul 29, 2024
9ff7adc
SMB2Client: Correctly handle signing when authenticated as guest
TalAloni Jul 29, 2024
2ff91c3
SMBLibrary 1.5.3.1
TalAloni Jul 29, 2024
1aef438
NegotiateContext: Fix parsing bugs
TalAloni Jul 30, 2024
e40a5b2
NegotiateRequest: Parse NegotiateContextList (SMB 3.1.1)
TalAloni Jul 30, 2024
2044b09
NegotiateRequest: Do not pad request if NegotiateContextList is empty
TalAloni Jul 30, 2024
dc52d4e
Added NegotiateResponseParsingTests
TalAloni Jul 30, 2024
1284a21
NTLMAuthenticationClient: Set MechanismListMIC when applicable
TalAloni Jul 30, 2024
6f4a0c1
SMBLibrary 1.5.3.2
TalAloni Jul 30, 2024
1485c36
SMB2: NegotiateResponse: Bugfix: NegotiateContext was not read from t…
TalAloni Aug 2, 2024
3f4381b
Tests: Added tests to NegotiateRequestParsingTests and NegotiateRespo…
TalAloni Aug 2, 2024
d3f69c2
SMBLibrary 1.5.3.3
TalAloni Aug 2, 2024
1d4484f
NetBiosSuffix.FileServiceService: Corrected typo
TalAloni Aug 3, 2024
e6065a1
SMB2Client: Updated encryption and signing logic to support SMB 3.0.2
TalAloni Aug 3, 2024
76c1ffa
SMB2: Added PreAuthIntegrityCapabilities structure implementation
TalAloni Aug 3, 2024
d847230
SMB2Cryptography: Added ComputeHash method
TalAloni Aug 3, 2024
3cf5fcb
SMB2: Added EncryptionCapabilities structure implementation
TalAloni Aug 3, 2024
fdc8234
NegotiateContext: Added constructors taking PreAuthIntegrityCapabilit…
TalAloni Aug 3, 2024
1845985
SMB2Client: Updated encryption and signing logic to support SMB 3.1.1
TalAloni Aug 3, 2024
5f4af1e
Move NegotiateContext structures to a separate directory
TalAloni Aug 3, 2024
d7d65f0
SMB2: EncryptionCapabilities.GetBytes: Bugfix: Corrected Data length …
TalAloni Aug 3, 2024
e0d8e8d
Refactored PreAuthIntegrityCapabilities and EncryptionCapabilities to…
TalAloni Aug 3, 2024
351093f
SMB2: Updated NegotiateContextType enum
TalAloni Aug 3, 2024
d64a5ff
SMBLibrary 1.5.3.4
TalAloni Aug 3, 2024
3c7588b
ACE: Removed unused using statements
TalAloni Aug 31, 2024
3f05434
ACE: Moved ACE Header to the ACE abstract class
TalAloni Aug 31, 2024
a64dc6c
ACL: Bugfix: Use AceSize when parsing ACL
TalAloni Aug 31, 2024
5de9bc1
Tests: Added QueryInfoResponseParsingTests
TalAloni Aug 31, 2024
8b795d5
SMBLibrary 1.5.3.5
TalAloni Aug 31, 2024
ab876da
Client: Added support for single-stage and triple-stage session setup
TalAloni Sep 25, 2024
e9b82af
QueryInfoHelper: Correctly handle UnsupportedInformationLevelExceptio…
TalAloni Dec 18, 2024
ffacfa5
SMB2Client: Minor code readability improvement
TalAloni Jan 10, 2025
143c23c
SMB2Client: Minor code readability improvement
TalAloni Jan 10, 2025
63be8c4
SMB2Client: Correctly handle single stage login
TalAloni Jan 10, 2025
f5d453f
SMBLibrary 1.5.4
TalAloni Jan 10, 2025
2ef0fb9
Improved documentation to have correct implementation to upload large…
philippkratzer Feb 14, 2025
2c4e42d
SMB2Client: Always sign outgoing messages when dialect is 3.1.1
TalAloni Apr 19, 2025
1172dfb
Client: Improved handling of invalid FILETIME
TalAloni Apr 19, 2025
d40699d
Implement FileAttributeTagInformation support for SMB file operations…
tanlng Apr 23, 2025
351f23e
Fix: Incorrect CommandLength calculation in NegotiateResponse (#298)
tanlng Apr 25, 2025
21313ac
Utilities: BlockingQueue: Bugfix: TryDequeue would block infinitely i…
TalAloni May 1, 2025
a9ec187
Utilities: BlockingQueue.TryDequeue: Change behavior to return all it…
TalAloni May 1, 2025
ef45082
ConnectionManager: Code refactoring: Use BlockingQueue.Abort which ha…
TalAloni May 1, 2025
d7695a6
Client: Disconnect: Ensure ongoing reading operation is complete befo…
TalAloni Jun 22, 2025
62c255b
SMBLibrary 1.5.4.1
TalAloni Jun 22, 2025
a13d560
Client: Bugfix: UserID was ignored when extended security was set to …
Khelthal Aug 8, 2025
ea031df
SMB2Client: Correctly report login error status instead of STATUS_INV…
TalAloni Oct 31, 2025
4befcae
SMB1Client, SMB2Client: Move responseTimeoutInMilliseconds from Conne…
TalAloni Oct 31, 2025
f27ee13
SMB2Client: Enabled SMB 3.0.2 support by default
TalAloni Oct 31, 2025
82df8f1
SMB2Client: Added constructor argument to enable SMB 3.1.1
TalAloni Oct 31, 2025
950b84b
LoginTests: Fix same port being used concurrently causing test to fail
TalAloni Oct 31, 2025
6b47aaa
SMB2: Added Notifications to Capabilities enum and improved documenta…
TalAloni Nov 1, 2025
07e8345
SMB2Client: Minor code refactoring
TalAloni Nov 1, 2025
c059c3d
SMB2Client: Throw exception if attempting to read or write more data …
TalAloni Nov 1, 2025
128a3b9
SMB2Client: Ignore request.Header.CreditCharge when computing next me…
TalAloni Nov 1, 2025
410cdce
SMB2Client: Correctly handle the uncommon case of a server not suppor…
TalAloni Nov 1, 2025
a4c0c0e
Client: Added virtual GetNetBiosServerName method
TalAloni Nov 1, 2025
32a0484
Client: Add Echo command support
TalAloni Nov 1, 2025
c906742
SMBLibrary 1.5.5
TalAloni Nov 1, 2025
34c344a
NTLM: NegotiateFlags: Renamed TargetNameSupplied to TargetNameNegotiated
TalAloni Nov 2, 2025
5018a8b
Client: NTLM: Set NTLMSSP_REQUEST_TARGET bit in negotiate message
TalAloni Nov 2, 2025
a729c69
SMB1Client: Correctly report login error status instead of STATUS_INV…
TalAloni Nov 8, 2025
a7eeea6
Added SMB1Cryptography
TalAloni Nov 8, 2025
7d9e149
SMB1Client: Renamed variable
TalAloni Nov 8, 2025
9496500
SMB1Client: Compute session key when extended security is set to false
TalAloni Nov 8, 2025
086f967
NTLM: NegotiateFlags: Renamed RequestLMSessionKey to RequestNonNTSess…
TalAloni Nov 8, 2025
885886e
Server: SessionSetupHelper: Correctly handle NTLM v1 non-extended-ses…
TalAloni Nov 8, 2025
ee635a6
SMB2Client: Simplify enabling SMB 3.1.1
TalAloni Nov 8, 2025
0c4dab2
SMBLibrary 1.5.5.1
TalAloni Nov 8, 2025
538b99b
Updated Readme.md: Added contribution terms
TalAloni Nov 25, 2025
4a4430c
SMB2Client: Implemented SetSecurityInformation (#324)
paraboll Nov 26, 2025
5c72d60
Code refactoring: Use SMBLibrary.DFS namespace for DFS data structures
TalAloni Nov 29, 2025
5c5c764
DFS: Implement ResponseGetDfsReferral
TalAloni Nov 29, 2025
8ffb044
DFS: DfsReferralHeaderFlags: Corrected typo
TalAloni Nov 29, 2025
69cea38
DFS: DfsReferralEntryV3: Bugfix: Read SpecialName and ExpandedNames f…
TalAloni Nov 29, 2025
c191b25
DFS: ResponseGetDfsReferral: Corrected GetBytes implementation
TalAloni Nov 30, 2025
bc99e21
DFS: Implement RequestGetDfsReferralEx
TalAloni Dec 15, 2025
38d9e2b
DFS: ResponseGetDfsReferralTests: Added test for response with multip…
TalAloni Dec 15, 2025
58b3d1a
DFS: DfsReferralEntryV2.WriteBytes: Correct write offset
TalAloni Dec 16, 2025
b349a07
NTDirectoryFileSystemTests.TestCancel: Skip test when platform is not…
TalAloni Jan 9, 2026
254835c
NTLMCryptography: Delete trailing whitespace
TalAloni Jan 12, 2026
e4411d3
SMB1: Implemented SMB_COM_QUERY_INFORMATION_DISK request and response
TalAloni Jan 12, 2026
7d4b66b
SMB1: FileStoreResponseHelper: Remove unused using statements
TalAloni Jan 12, 2026
0e70ed4
SMBServer.SMB1: Remove unused using statement
TalAloni Jan 12, 2026
432e879
Server: SMB1: Add support for SMB_COM_QUERY_INFORMATION_DISK used by …
TalAloni Jan 12, 2026
85ffc2b
SecurityDescriptor: Remove unused using statements
TalAloni Feb 16, 2026
d08b9de
SecurityDescriptor: Set SelfRelative bit when applicable
TalAloni Feb 16, 2026
0a185f8
SMBLibrary 1.5.5.2
TalAloni Feb 22, 2026
45cc709
FileSystemAttributes: Fix typo, Rename CasePreservedNamed to CasePres…
TalAloni Feb 26, 2026
46d4781
FileAccessMask: Add missing FILE_DELETE_CHILD (#333)
lostromb Feb 26, 2026
458f30b
FileSystemAttributes: Add missing enum values (#335)
lostromb Feb 26, 2026
2a0b2ce
DeviceCharacteristics: Add additional enum values (#334)
lostromb Feb 26, 2026
4910252
ClientExamples: Add Kerberos authentication example
TalAloni Feb 26, 2026
15a4d6b
NTFileStore: Added summary to several enums (#336)
lostromb Feb 26, 2026
039dd08
SMB2Header: Remove unused using statement
TalAloni Feb 27, 2026
049b7fc
SMB2Header: Add SignatureLength constant
TalAloni Feb 27, 2026
5f5d8b9
SMB2Cryptography: CalculateSignature: Return 16 bytes signature inste…
TalAloni Feb 27, 2026
301b089
SMB2Cryptography: Added VerifySignature method
TalAloni Feb 27, 2026
0bb0938
RevisionHistory: Removed unintended duplication
TalAloni Feb 27, 2026
65952a9
SMBLibrary 1.5.6
TalAloni Feb 27, 2026
4db9687
Updated SMBLibrary\Readme.md
TalAloni Mar 22, 2026
90bac08
Client: NTLMAuthenticationClient: Added virtual CreateNegotiateMessag…
TalAloni Mar 22, 2026
6fefa47
NTLMAuthenticationHelper: Removed unused using statement
TalAloni Mar 22, 2026
c52da67
Client: NTLMAuthenticationHelper: Added GetNegotiateMessage overload
TalAloni Mar 22, 2026
479c28e
Client: NTLMAuthenticationHelper: GetNegotiateMessage: Added ability …
TalAloni Mar 22, 2026
c944922
Client: NTLMAuthenticationClient: Bugfix: DomainName and Workstation …
TalAloni Mar 22, 2026
1fcd21e
SMBLibrary 1.5.6.1
TalAloni Mar 22, 2026
6057c94
NTLMCryptography: Correct typo
TalAloni Mar 24, 2026
ada15ee
RC4: Added Encrypt/Decrypt overload accepting RC4KeyState to allow en…
TalAloni Mar 24, 2026
ce80ddc
NTLMCryptography: ComputeMechListMIC: Update seqNum type to uint
TalAloni Mar 24, 2026
2cbfe6b
NTLMCryptography: Extracted ComputeMessageHash method
TalAloni Mar 24, 2026
4ff7492
NTLMCryptography: Extracted ComputeMessageSignature
TalAloni Mar 24, 2026
995e936
NTLMCryptography: Added VerifyMessageHash method
TalAloni Mar 24, 2026
d136f76
IndependentNTLMAuthenticationProvider: Extracted virtual CreateChalle…
TalAloni Mar 24, 2026
023cc5c
SMBLibrary 1.5.6.2
TalAloni Mar 24, 2026
8244887
NTLMCryptography: Marked ComputeSignKey and ComputeSealKey as public
TalAloni Mar 25, 2026
a90c3d0
IndependentNTLMAuthenticationProvider: Remove unused using statement
TalAloni Apr 5, 2026
008ed45
IndependentNTLMAuthenticationProvider: Extract GetServerName method
TalAloni Apr 5, 2026
1750c33
SMB2Client: Verify message signature when applicable
TalAloni Apr 5, 2026
d4af2d1
SMBLibrary 1.5.6.3
TalAloni Apr 5, 2026
df82ee9
SMB2Client: TreeConnect: Minor code refactoring
TalAloni Apr 6, 2026
9ae4f8d
Client: Fix rare racing condition when Disconnect is called before re…
uflowie Apr 17, 2026
9dc1c89
SMBLibrary.Adapters: Increment DiskAccessLibrary to v1.6.6
TalAloni Apr 17, 2026
bb4854a
SMBLibrary 1.5.7
TalAloni Apr 17, 2026
340a73f
Updated documentation
TalAloni Apr 17, 2026
4c8a164
Client: DFS: Add helper classes (#346)
jahales Apr 18, 2026
5ed3bb6
IAuthenticationClient: Added ResetSecurityContext in order to support…
TalAloni Apr 18, 2026
15f85fc
SMB1Client, SMB2Client: Added Transport property
TalAloni Apr 18, 2026
356a351
Replace #if NETSTANDARD2_0 with #if NETSTANDARD2_0_OR_GREATER || NET5…
flozano Apr 19, 2026
336c47f
SMB2Client: Moved CIFS SPN creation to a separate method
TalAloni Apr 20, 2026
196d64e
SMBLibrary.Win32: SSPIHelper: Extract GetInitialMessage method that c…
TalAloni May 24, 2026
7742c28
SMBLibrary.Win32: SSPIHelper: Added AcquireKerberosCredentialsHandle
TalAloni May 24, 2026
71e67ae
Client: Add SMB2DfsFileStore to follow DFS referrals (#352)
jahales Jul 10, 2026
583bccf
SMB2ClientTests: Reduce likelyhood of two TCP listeners attempting to…
TalAloni Jul 10, 2026
6d0134c
NTDirectoryFileSystemTests: Use temp folder instead of 'C:\Tests'
TalAloni Jul 10, 2026
6062dd8
SMB2Client: Fix incorrect signature verification on share-level encry…
jonahhes Jul 13, 2026
2553397
SMBLibrary 1.5.7.1
TalAloni Jul 13, 2026
07018f0
SMB2Client: DFS: Set SMB2_FLAGS_DFS_OPERATIONS on CREATE for a DFS ro…
jahales Aug 5, 2026
87ecb88
NTLMCryptography: Change method order to group NTLM v1 method together
TalAloni Sep 4, 2026
3bc7433
Added ENABLE_NTLMV1 compilation flag
TalAloni Sep 4, 2026
e2cbf53
SMB1: NegotiateResponse: Fix IndexOutOfRangeException if ServerName i…
TalAloni Sep 5, 2026
8268e00
Tests: SMB1: Added NegotiateResponseParsingTests
TalAloni Sep 5, 2026
2a8911f
SMB1Client: Minor code deduplication
TalAloni Sep 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 47 additions & 8 deletions ClientExamples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Login and list shares:
======================
```
```cs
SMB1Client client = new SMB1Client(); // SMB2Client can be used as well
bool isConnected = client.Connect(IPAddress.Parse("192.168.1.11"), SMBTransportType.DirectTCPTransport);
if (isConnected)
Expand All @@ -17,7 +17,7 @@ if (isConnected)

Connect to share and list files and directories - SMB1:
=======================================================
```
```cs
ISMBFileStore fileStore = client.TreeConnect("Shared", out status);
if (status == NTStatus.STATUS_SUCCESS)
{
Expand All @@ -36,7 +36,7 @@ status = fileStore.Disconnect();

Connect to share and list files and directories - SMB2:
=======================================================
```
```cs
ISMBFileStore fileStore = client.TreeConnect("Shared", out status);
if (status == NTStatus.STATUS_SUCCESS)
{
Expand All @@ -55,7 +55,7 @@ status = fileStore.Disconnect();

Read large file to its end:
===========================
```
```cs
ISMBFileStore fileStore = client.TreeConnect("Shared", out status);
object fileHandle;
FileStatus fileStatus;
Expand Down Expand Up @@ -93,7 +93,7 @@ status = fileStore.Disconnect();

Create a file and write to it:
==============================
```
```cs
ISMBFileStore fileStore = client.TreeConnect("Shared", out status);
string filePath = "NewFile.txt";
if (fileStore is SMB1FileStore)
Expand All @@ -119,7 +119,7 @@ status = fileStore.Disconnect();

Write a large file:
===================
```
```cs
ISMBFileStore fileStore = client.TreeConnect("Shared", out status);
if (status != NTStatus.STATUS_SUCCESS)
{
Expand All @@ -137,7 +137,7 @@ FileStatus fileStatus;
status = fileStore.CreateFile(out fileHandle, out fileStatus, remoteFilePath, AccessMask.GENERIC_WRITE | AccessMask.SYNCHRONIZE, FileAttributes.Normal, ShareAccess.None, CreateDisposition.FILE_CREATE, CreateOptions.FILE_NON_DIRECTORY_FILE | CreateOptions.FILE_SYNCHRONOUS_IO_ALERT, null);
if (status == NTStatus.STATUS_SUCCESS)
{
int writeOffset = 0;
long writeOffset = 0;
while (localFileStream.Position < localFileStream.Length)
{
byte[] buffer = new byte[(int)client.MaxWriteSize];
Expand All @@ -161,7 +161,7 @@ status = fileStore.Disconnect();

Delete file:
============
```
```cs
ISMBFileStore fileStore = client.TreeConnect("Shared", out status);
string filePath = "DeleteMe.txt";
if (fileStore is SMB1FileStore)
Expand All @@ -181,4 +181,43 @@ if (status == NTStatus.STATUS_SUCCESS)
status = fileStore.CloseFile(fileHandle);
}
status = fileStore.Disconnect();
```

Cross-platform Kerberos authentication:
=======================================
You can have cross-platform Kerberos login support by creating a class that implements IAuthenticationClient.
[Kerberos.NET](https://github.com/dotnet/Kerberos.NET) can easily be used to implement IAuthenticationClient.
Note that in order for Kerberos.NET to work on non-Windows platforms, you must provide a cross-platform implementation of IKerberosDnsQuery (and register it using DnsQuery.RegisterImplementation)
[DnsClient.NET](https://github.com/MichaCo/DnsClient.NET) can easily be used to implement IKerberosDnsQuery.

```cs
public class KerberosNetAuthenticationClient : IAuthenticationClient
{
private readonly KerberosClient m_kerberosClient;
private string m_spn;
private byte[] m_sessionKey;

public KerberosNetAuthenticationClient(string user, string password, string domain, string host)
{
m_kerberosClient = new KerberosClient();
m_kerberosClient.Authenticate(new KerberosPasswordCredential(user, password, domain)).Wait();
m_spn = $"cifs/{host}";
}

public byte[] InitializeSecurityContext(byte[] inputToken)
{
KrbApReq ticket = m_kerberosClient.GetServiceTicket(m_spn).GetAwaiter().GetResult();
KerberosClientCacheEntry cachedItem = (KerberosClientCacheEntry)m_kerberosClient.Cache.GetCacheItem(m_spn);
m_sessionKey = cachedItem.SessionKey.KeyValue.ToArray();
return ticket.EncodeGssApi().ToArray();
}

public byte[] GetSessionKey() => m_sessionKey;

public void ResetSecurityContext(string spn)
{
m_spn = spn;
m_sessionKey = null;
}
}
```

This file was deleted.

This file was deleted.

154 changes: 0 additions & 154 deletions DiskAccessLibrary.FileSystems.Abstractions/FileSystem.cs

This file was deleted.

52 changes: 0 additions & 52 deletions DiskAccessLibrary.FileSystems.Abstractions/FileSystemEntry.cs

This file was deleted.

Loading