Documentation
¶
Index ¶
- Constants
- Variables
- func ParseKerberosKeys(ctx context.Context, data []byte, username string) []*msrpcfern.KerberosKeyEntry
- func SetupAdauthOptions(username, domain, extractedHostname, fallbackTarget string, ...) (*adauth.Options, error)
- func SetupKerberosTicketWithHostname(ticketBase64 string) (string, func(), error)
- type DRSUAPIClient
- func (c *DRSUAPIClient) Bind(ctx context.Context) error
- func (c *DRSUAPIClient) Close(ctx context.Context) error
- func (c *DRSUAPIClient) Connect(ctx context.Context, drsuapiBinding dcerpc.StringBinding) error
- func (c *DRSUAPIClient) ExtractAllUserCredentials(ctx context.Context, domain string, domainInfo *DomainInfo, ...) ([]*msrpcfern.DcSyncUserEntry, int, int, error)
- func (c *DRSUAPIClient) ExtractUserCredentials(ctx context.Context, username, domain string, ...) (*msrpcfern.DcSyncUserEntry, error)
- func (c *DRSUAPIClient) Unbind(ctx context.Context) error
- type DomainInfo
- type EndpointMapper
- type SAMRClient
- type UserEntry
- type WMIExecutor
Constants ¶
const ( ProtocolSequenceRPC uint16 = 7 ProtocolSequenceNP uint16 = 15 )
WMI protocol constants for DCOM communication
Variables ¶
var ( ComVersion = &dcom.COMVersion{ MajorVersion: 5, MinorVersion: 7, } ORPCThis = &dcom.ORPCThis{Version: ComVersion} )
Functions ¶
func ParseKerberosKeys ¶
func ParseKerberosKeys(ctx context.Context, data []byte, username string) []*msrpcfern.KerberosKeyEntry
ParseKerberosKeys parses Kerberos keys from supplemental credentials
func SetupAdauthOptions ¶ added in v0.0.81
func SetupAdauthOptions(username, domain, extractedHostname, fallbackTarget string, kerberosTicket *string, password string, ntlmHash *string) (*adauth.Options, error)
SetupAdauthOptions configures adauth options for authentication
func SetupKerberosTicketWithHostname ¶ added in v0.0.81
SetupKerberosTicketWithHostname creates ccache file, extracts hostname, and sets KRB5CCNAME Returns: extractedHostname, cleanup function, error
Types ¶
type DRSUAPIClient ¶
type DRSUAPIClient struct {
Host string
AuthOptions []dcerpc.Option
// contains filtered or unexported fields
}
DRSUAPIClient provides functionality for interacting with the Directory Replication Service API
func NewDRSUAPIClient ¶
func NewDRSUAPIClient(host string, authOptions []dcerpc.Option) *DRSUAPIClient
NewDRSUAPIClient creates a new DRSUAPI client with dcerpc auth options
func (*DRSUAPIClient) Bind ¶
func (c *DRSUAPIClient) Bind(ctx context.Context) error
Bind performs the DRSBind operation to establish a session
func (*DRSUAPIClient) Close ¶
func (c *DRSUAPIClient) Close(ctx context.Context) error
Close closes the connection to the DRSUAPI service
func (*DRSUAPIClient) Connect ¶
func (c *DRSUAPIClient) Connect(ctx context.Context, drsuapiBinding dcerpc.StringBinding) error
Connect establishes a connection to the DRSUAPI service on the specified endpoint
func (*DRSUAPIClient) ExtractAllUserCredentials ¶
func (c *DRSUAPIClient) ExtractAllUserCredentials(ctx context.Context, domain string, domainInfo *DomainInfo, config *msrpcfern.PentestMsrpcDcSyncConfig) ([]*msrpcfern.DcSyncUserEntry, int, int, error)
ExtractAllUserCredentials extracts credentials for all users in the domain using DRSUAPI
func (*DRSUAPIClient) ExtractUserCredentials ¶
func (c *DRSUAPIClient) ExtractUserCredentials(ctx context.Context, username, domain string, resp *drsuapi.GetNCChangesResponse, config *msrpcfern.PentestMsrpcDcSyncConfig) (*msrpcfern.DcSyncUserEntry, error)
ExtractUserCredentials extracts credentials from DRSUAPI replication data
type DomainInfo ¶
DomainInfo represents domain information including SID and users
type EndpointMapper ¶
EndpointMapper provides functionality for discovering RPC endpoints via EPM
func NewEndpointMapper ¶
func NewEndpointMapper(host string, authOptions []dcerpc.Option) *EndpointMapper
NewEndpointMapper creates a new endpoint mapper client with dcerpc auth options
func (*EndpointMapper) DiscoverDRSUAPIEndpoints ¶
func (m *EndpointMapper) DiscoverDRSUAPIEndpoints(ctx context.Context) ([]dcerpc.StringBinding, error)
DiscoverDRSUAPIEndpoints queries EPM for DRSUAPI TCP endpoints using the library
type SAMRClient ¶
SAMRClient provides functionality for interacting with the SAM Remote protocol
func NewSAMRClient ¶
func NewSAMRClient(host string, authOptions []dcerpc.Option) *SAMRClient
NewSAMRClient creates a new SAMR client with dcerpc auth options
func (*SAMRClient) EnumerateDomainUsers ¶
func (c *SAMRClient) EnumerateDomainUsers(ctx context.Context, domain string) (*DomainInfo, error)
EnumerateDomainUsers connects to SAMR and enumerates all users with RID info
type WMIExecutor ¶ added in v0.0.81
type WMIExecutor struct {
// contains filtered or unexported fields
}
WMIExecutor provides WMI command execution functionality
func NewWMIExecutor ¶ added in v0.0.81
func NewWMIExecutor(ctx context.Context, host, username, password, domain string) (*WMIExecutor, error)
NewWMIExecutor creates a new WMI executor with proper authentication
func (*WMIExecutor) Close ¶ added in v0.0.81
func (w *WMIExecutor) Close(ctx context.Context) error
Close closes the WMI executor connection
func (*WMIExecutor) ExecuteCommand ¶ added in v0.0.81
ExecuteCommand executes a command using WMI Win32_Process.Create