Documentation
¶
Index ¶
- Constants
- Variables
- func AZVMToOpenGraph(obj AZVM) ([]*openGraphNode, []*openGraphEdge)
- func KeyTabToOpenGraph(obj Keytab) []*openGraphEdge
- func LinhoundToOpenGraphObjects(obj LinhoundObject) ([]*openGraphNode, []*openGraphEdge)
- func MergeOpenGraphJSONs() string
- func PrincipalToBloodhoundName(principal string, realm string) (string, error)
- func TGTToOpenGraph(obj TGT) []*openGraphEdge
- type AZVM
- type AuthorizedKey
- type Computer
- type ForwardedKey
- type Keytab
- type LinhoundCollector
- func (l LinhoundCollector) AuthorizedKeys(userName string) []*AuthorizedKey
- func (l LinhoundCollector) AzureVM() []*AZVM
- func (l LinhoundCollector) CollectArtifacts(duration int) ([]*Sudoer, []*PrivateKey, []*ForwardedKey, []*AuthorizedKey, []*Keytab, []*TGT, ...)
- func (l LinhoundCollector) CollectArtifactsOpenGraph(duration int) string
- func (l LinhoundCollector) ForwardedKeys(duration int) []*ForwardedKey
- func (l LinhoundCollector) Keytabs() []*Keytab
- func (l LinhoundCollector) PrivateKeys(userName string) []*PrivateKey
- func (l LinhoundCollector) Sudoer(userName string) []*Sudoer
- func (l LinhoundCollector) TGTs() []*TGT
- type LinhoundKey
- type LinhoundObject
- type PrivateKey
- type PublicKey
- type Sudoer
- type TGT
Constants ¶
Variables ¶
var Verbose = false
Verbose defines whether verbose logging is enabled
Functions ¶
func AZVMToOpenGraph ¶
func AZVMToOpenGraph(obj AZVM) ([]*openGraphNode, []*openGraphEdge)
func KeyTabToOpenGraph ¶
func KeyTabToOpenGraph(obj Keytab) []*openGraphEdge
TODO (SSHComputer)<-[sameMachine]->(Computer)
func LinhoundToOpenGraphObjects ¶
func LinhoundToOpenGraphObjects(obj LinhoundObject) ([]*openGraphNode, []*openGraphEdge)
LinhoundToOpenGraphObjects takes a Linhound object and transforms it into OpenGraph nodes and edges
func MergeOpenGraphJSONs ¶
func MergeOpenGraphJSONs() string
MergeOpenGraphJSONs reads OpenGraph JSON objects from stdin and merges them
Types ¶
type AuthorizedKey ¶
func (AuthorizedKey) GetComputer ¶
func (ak AuthorizedKey) GetComputer() Computer
func (AuthorizedKey) GetPublicKey ¶
func (ak AuthorizedKey) GetPublicKey() PublicKey
func (AuthorizedKey) GetUserName ¶
func (ak AuthorizedKey) GetUserName() string
type ForwardedKey ¶
type ForwardedKey struct {
Computer Computer
UserName string
PublicKey PublicKey
LastLoginSocket string
LastLoginTime string
LastLoginIP string
}
func NewForwardedKey ¶
func (ForwardedKey) GetComputer ¶
func (fk ForwardedKey) GetComputer() Computer
func (ForwardedKey) GetPublicKey ¶
func (fk ForwardedKey) GetPublicKey() PublicKey
func (ForwardedKey) GetUserName ¶
func (fk ForwardedKey) GetUserName() string
type LinhoundCollector ¶
type LinhoundCollector struct {
// contains filtered or unexported fields
}
func NewLinhoundCollector ¶
func NewLinhoundCollector() *LinhoundCollector
NewLinHoundCollector creates a new LinhoundCollector object and loads the current systems metadata and SSHD config
func (LinhoundCollector) AuthorizedKeys ¶
func (l LinhoundCollector) AuthorizedKeys(userName string) []*AuthorizedKey
AuthorizedKeys retrieves all authorized keys for a given user
func (LinhoundCollector) AzureVM ¶
func (l LinhoundCollector) AzureVM() []*AZVM
AzureVM retrieves information from Azure IMDS
func (LinhoundCollector) CollectArtifacts ¶
func (l LinhoundCollector) CollectArtifacts(duration int) ([]*Sudoer, []*PrivateKey, []*ForwardedKey, []*AuthorizedKey, []*Keytab, []*TGT, []*AZVM)
CollectArtifacts iterates over all local users and searches for respective authorized keys, private keys, forwarded agents and sudoer privileges.
func (LinhoundCollector) CollectArtifactsOpenGraph ¶
func (l LinhoundCollector) CollectArtifactsOpenGraph(duration int) string
CollectArtifactsOpenGraph collects all
func (LinhoundCollector) ForwardedKeys ¶
func (l LinhoundCollector) ForwardedKeys(duration int) []*ForwardedKey
ForwardedKeys collects key information from all SSH agent sockets for the next 'duration' minutes
func (LinhoundCollector) Keytabs ¶
func (l LinhoundCollector) Keytabs() []*Keytab
Keytabs retrieves keytabs from the local computer
func (LinhoundCollector) PrivateKeys ¶
func (l LinhoundCollector) PrivateKeys(userName string) []*PrivateKey
PrivateKeys retrieves all private keys for a given user
func (LinhoundCollector) Sudoer ¶
func (l LinhoundCollector) Sudoer(userName string) []*Sudoer
Sudoer returns a list of a sudoer object if the specified user has sudo privileges
func (LinhoundCollector) TGTs ¶
func (l LinhoundCollector) TGTs() []*TGT
TGTs retrieves all TGTs from local ticket caches
type LinhoundKey ¶
type LinhoundKey interface {
GetPublicKey() PublicKey
}
type LinhoundObject ¶
type PrivateKey ¶
type PrivateKey struct {
Computer Computer
UserName string
PublicKey PublicKey
FilePath string
KeyFormat string
KDF string
Cipher string
Encrypted bool
}
func NewPrivateKey ¶
func (PrivateKey) GetComputer ¶
func (pk PrivateKey) GetComputer() Computer
func (PrivateKey) GetPublicKey ¶
func (pk PrivateKey) GetPublicKey() PublicKey
func (PrivateKey) GetUserName ¶
func (pk PrivateKey) GetUserName() string




