securitymode
import "github.com/TheManticoreProject/Manticore/network/smb/smb_v10/securitymode"
Index
- type SecurityMode
- func (sm SecurityMode) IsSecuritySignatureEnabled() bool
- func (sm SecurityMode) IsSecuritySignatureRequired() bool
- func (sm SecurityMode) String() string
- func (sm SecurityMode) SupportsChallengeResponseAuth() bool
- func (sm SecurityMode) SupportsPlaintextPasswordAuth() bool
- func (sm SecurityMode) SupportsShareLevelAccessControl() bool
- func (sm SecurityMode) SupportsUserLevelAccessControl() bool
type SecurityMode
type SecurityMode uint8
Security mode flags for SMB negotiation Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/a4229e1a-8a4e-489a-a2eb-11b7f360e60c
const (
// NEGOTIATE_USER_SECURITY: If clear (0), the server supports only Share Level access control.
// If set (1), the server supports only User Level access control.
NEGOTIATE_USER_SECURITY SecurityMode = 0x01
// NEGOTIATE_ENCRYPT_PASSWORDS: If clear, the server supports only plaintext password authentication.
// If set, the server supports challenge/response authentication.
NEGOTIATE_ENCRYPT_PASSWORDS SecurityMode = 0x02
// NEGOTIATE_SECURITY_SIGNATURES_ENABLED: If clear, the server does not support SMB security signatures.
// If set, the server supports SMB security signatures for this connection.
NEGOTIATE_SECURITY_SIGNATURES_ENABLED SecurityMode = 0x04
// NEGOTIATE_SECURITY_SIGNATURES_REQUIRED: If clear, the security signatures are optional for this connection.
// If set, the server requires security signatures.
// This bit MUST be clear if the NEGOTIATE_SECURITY_SIGNATURES_ENABLED bit is clear.
NEGOTIATE_SECURITY_SIGNATURES_REQUIRED SecurityMode = 0x08
)
const (
SecurityModeNone SecurityMode = iota
)
func (SecurityMode) IsSecuritySignatureEnabled
func (sm SecurityMode) IsSecuritySignatureEnabled() bool
IsSecuritySignatureEnabled returns true if the server supports SMB security signatures
Returns:
- bool: True if the server supports SMB security signatures, false otherwise
func (SecurityMode) IsSecuritySignatureRequired
func (sm SecurityMode) IsSecuritySignatureRequired() bool
IsSecuritySignatureRequired returns true if the server requires security signatures
Returns:
- bool: True if the server requires security signatures, false otherwise
func (SecurityMode) String
func (sm SecurityMode) String() string
String returns a string representation of the enabled security mode flags
Returns:
- string: A string containing all enabled security mode flags separated by |
func (SecurityMode) SupportsChallengeResponseAuth
func (sm SecurityMode) SupportsChallengeResponseAuth() bool
SupportsChallengeResponseAuth returns true if the server supports challenge/response authentication
Returns:
- bool: True if the server supports challenge/response authentication, false otherwise
func (SecurityMode) SupportsPlaintextPasswordAuth
func (sm SecurityMode) SupportsPlaintextPasswordAuth() bool
SupportsPlaintextPasswordAuth returns true if the server supports plaintext password authentication
Returns:
- bool: True if the server supports plaintext password authentication, false otherwise
func (SecurityMode) SupportsShareLevelAccessControl
func (sm SecurityMode) SupportsShareLevelAccessControl() bool
SupportsShareLevelAccessControl returns true if the server supports Share Level access control
Returns:
- bool: True if the server supports Share Level access control, false otherwise
func (SecurityMode) SupportsUserLevelAccessControl
func (sm SecurityMode) SupportsUserLevelAccessControl() bool
SupportsUserLevelAccessControl returns true if the server supports User Level access control
Returns:
- bool: True if the server supports User Level access control, false otherwise