Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Close() error
- func (c *Client) Connect() error
- func (c *Client) ConnectWithContext(ctx context.Context) error
- func (c *Client) DetectDomainController(shares []*ShareInfo) bool
- func (c *Client) EnumerateShares() ([]*ShareInfo, error)
- func (c *Client) EnumerateSharesWithContext(ctx context.Context) ([]*ShareInfo, error)
- func (c *Client) GetServerInfo() *ServerInfo
- func (c *Client) IsAuthenticated() bool
- func (c *Client) IsConnected() bool
- func (c *Client) SetAnonymous()
- func (c *Client) SetCredentials(username, password, domain string)
- func (c *Client) SetNullSession()
- func (c *Client) TestCredentials(username, password, domain string) (bool, string, error)
- type ServerInfo
- type ShareInfo
Constants ¶
This section is empty.
Variables ¶
var WindowsBuildMapping = map[string]string{
"20348": "Windows Server 2022",
"19041": "Windows Server 2022 (Insider)",
"17763": "Windows Server 2019",
"14393": "Windows Server 2016",
"10586": "Windows Server 2016 (Technical Preview)",
"9600": "Windows Server 2012 R2",
"9200": "Windows Server 2012",
"7601": "Windows Server 2008 R2 SP1 / Windows 7 SP1",
"6002": "Windows Server 2008 SP2 / Windows Vista SP2",
"6001": "Windows Server 2008 SP1 / Windows Vista SP1",
"6000": "Windows Server 2008 / Windows Vista",
"22631": "Windows 11 23H2",
"22621": "Windows 11 22H2",
"22000": "Windows 11 21H2",
"19045": "Windows 10 22H2",
"19044": "Windows 10 21H2",
"19043": "Windows 10 21H1",
"19042": "Windows 10 20H2",
"18363": "Windows 10 1909",
"18362": "Windows 10 1903",
"17134": "Windows 10 1803",
"16299": "Windows 10 1709",
"15063": "Windows 10 1703",
"10240": "Windows 10 RTM",
"9431": "Windows 8.1 Update 1",
"7600": "Windows 7 RTM",
}
WindowsBuildMapping maps Windows build numbers to human-readable versions
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Host string
Port int
Username string
Password string
Domain string
UseAnonymous bool
UseNullSession bool
Timeout time.Duration
// contains filtered or unexported fields
}
Client represents a unified SMB client that provides base functionality for both enumeration and pentest operations
func (*Client) ConnectWithContext ¶
ConnectWithContext establishes connection to SMB server and performs authentication with context
func (*Client) DetectDomainController ¶
DetectDomainController checks if the server appears to be a domain controller
func (*Client) EnumerateShares ¶
EnumerateShares lists available shares using TreeConnect testing
func (*Client) EnumerateSharesWithContext ¶
EnumerateSharesWithContext lists available shares using TreeConnect testing with context
func (*Client) GetServerInfo ¶
func (c *Client) GetServerInfo() *ServerInfo
GetServerInfo returns extracted server information
func (*Client) IsAuthenticated ¶
IsAuthenticated returns true if client is authenticated to SMB server
func (*Client) IsConnected ¶
IsConnected returns true if client is connected to SMB server
func (*Client) SetAnonymous ¶
func (c *Client) SetAnonymous()
SetAnonymous configures client for anonymous authentication
func (*Client) SetCredentials ¶
SetCredentials sets username and password for authentication
func (*Client) SetNullSession ¶
func (c *Client) SetNullSession()
SetNullSession configures client for null session authentication
type ServerInfo ¶
type ServerInfo struct {
ServerName string
Domain string
OSVersion string
ServerType string
IsDomainController bool
Capabilities []string
SigningRequired bool
EncryptionSupported bool
SupportedVersions []string
}
ServerInfo contains basic server information extracted from SMB connection