kerberos

package
v0.0.111 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientManager

type ClientManager struct {
	Config *config.Config
	Target *Target
}

ClientManager handles Kerberos client configuration and creation

func NewClientManager

func NewClientManager(target *Target) *ClientManager

NewClientManager creates a new Kerberos client manager

func (*ClientManager) CreateClientFromConfig

func (kcm *ClientManager) CreateClientFromConfig(pentestConfig *kerberosfern.PentestKerberosConfig) (*client.Client, string, error)

CreateClientFromConfig creates a Kerberos client from the provided config

func (*ClientManager) CreateConfiguration

func (kcm *ClientManager) CreateConfiguration() *config.Config

CreateConfiguration creates a Kerberos configuration for the target

type S4UManager

type S4UManager struct {
	Client *client.Client
	Config *config.Config
}

S4UManager handles Service for User (S4U) operations for Kerberos delegation

func NewS4UManager

func NewS4UManager(client *client.Client, config *config.Config) *S4UManager

NewS4UManager creates a new S4U manager

func (*S4UManager) PerformS4U2Proxy

func (s4u *S4UManager) PerformS4U2Proxy(ctx context.Context, requestingUser, userDomain, impersonateUser string, tgt, s4u2SelfTicket messages.Ticket, sessionKey types.EncryptionKey, spn string) error

PerformS4U2Proxy performs S4U2Proxy to get a service ticket for the target SPN

func (*S4UManager) PerformS4U2Self

func (s4u *S4UManager) PerformS4U2Self(ctx context.Context, requestingUser, userDomain, impersonateUser string, tgt messages.Ticket, sessionKey types.EncryptionKey) (messages.Ticket, error)

PerformS4U2Self performs S4U2Self to get a service ticket for the impersonated user

type Target

type Target struct {
	Host   string
	Port   int
	Domain string
}

Target represents a parsed Kerberos target

func ParseTarget

func ParseTarget(targetStr string) (*Target, error)

ParseTarget parses a target string into components

type TicketInfo added in v0.0.83

type TicketInfo struct {
	Base64    string
	Principal string
	Realm     string

	// Enhanced ticket metadata
	ServicePrincipal    *string
	StartTime           *time.Time
	EndTime             *time.Time
	RenewUntil          *time.Time
	TicketFlags         *string
	EncryptionType      *string
	KeyVersionNumber    *int
	Algorithm           *string
	TicketVersionNumber *int
}

TicketInfo contains information extracted from a Kerberos ticket

type TicketManager

type TicketManager struct {
	Client *client.Client
	Config *config.Config
}

TicketManager handles Kerberos ticket operations

func NewTicketManager

func NewTicketManager(client *client.Client, config *config.Config) *TicketManager

NewTicketManager creates a new ticket manager

func (*TicketManager) GenerateTicketBase64

func (tm *TicketManager) GenerateTicketBase64(impersonateUser, userDomain, spn string) (string, error)

GenerateTicketBase64 generates the acquired ticket as a base64-encoded ccache

func (*TicketManager) GetTGT

func (tm *TicketManager) GetTGT(userDomain string) (messages.Ticket, types.EncryptionKey, error)

GetTGT retrieves a Ticket Granting Ticket for the specified domain

func (*TicketManager) RequestServiceTicket

func (tm *TicketManager) RequestServiceTicket(ctx context.Context, requestingUser, userDomain, impersonateUser, spn string) (*TicketInfo, error)

RequestServiceTicket performs service ticket acquisition (with optional S4U2Self and S4U2Proxy for impersonation)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL