kirbi
import "github.com/TheManticoreProject/Manticore/network/kerberos/v5/credcache/kirbi"
Package kirbi reads and writes “.kirbi” credential files. A .kirbi file is a DER-encoded Kerberos KRB-CRED message (RFC 4120 Section 5.8.1) carrying one or more tickets — the interchange format used by Rubeus and Windows Kerberos tooling for pass-the-ticket. By convention the EncKrbCredPart is stored unencrypted with etype 0, so the session key and ticket metadata are in the clear.
Index
- func Bytes(cred *messages.KRBCred) ([]byte, error)
- func Load(path string) (*messages.KRBCred, error)
- func New(ticketRaw []byte, info messages.KrbCredInfo) (*messages.KRBCred, error)
- func Parse(data []byte) (*messages.KRBCred, error)
- func Save(path string, cred *messages.KRBCred) error
- func TicketInfo(cred *messages.KRBCred) ([]messages.KrbCredInfo, error)
func Bytes
func Bytes(cred *messages.KRBCred) ([]byte, error)
Bytes returns the DER encoding of a KRB-CRED (the raw .kirbi contents).
func Load
func Load(path string) (*messages.KRBCred, error)
Load reads and parses a .kirbi file.
func New
func New(ticketRaw []byte, info messages.KrbCredInfo) (*messages.KRBCred, error)
New builds a KRB-CRED wrapping a single ticket, with the EncKrbCredPart stored unencrypted (etype 0) as .kirbi conventionally does. ticketRaw is the raw APPLICATION[1] ticket TLV as issued by the KDC; info carries the session key, principal names, flags, and times for that ticket.
func Parse
func Parse(data []byte) (*messages.KRBCred, error)
Parse decodes .kirbi bytes into a KRB-CRED.
func Save
func Save(path string, cred *messages.KRBCred) error
Save writes cred to path in .kirbi (DER KRB-CRED) form, 0600.
func TicketInfo
func TicketInfo(cred *messages.KRBCred) ([]messages.KrbCredInfo, error)
TicketInfo decodes and returns the EncKrbCredPart ticket-info entries from a KRB-CRED whose enc-part is stored unencrypted (etype 0), the .kirbi convention. It errors if the enc-part is encrypted (etype != 0).