recon

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 74 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultGroupNamePrefix  = "/aws/lambda"
	DefaultStreamNamePrefix = fmt.Sprintf("%d", time.Now().Year())
)
View Source
var AWSRegions = []string{"us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-south-1", "eu-west-3", "eu-north-1", "me-south-1", "sa-east-1"}

Functions

This section is empty.

Types

type AccessKey added in v0.0.17

type AccessKey struct {
	AWSService string
	UserName   string
	ID         string
	CreateDate time.Time
	Status     string
}

type AccessKeysOptions added in v0.0.17

type AccessKeysOptions struct {
	UserNames    []string
	IDs          []string
	BeforeHook   BeforeHookFunc
	AfterRunHook AfterRunHookFunc
}

type AccessKeysRecon added in v0.0.17

type AccessKeysRecon struct {
	// contains filtered or unexported fields
}

func NewAccessKeysRecon added in v0.0.17

func NewAccessKeysRecon(cfg *config.Config, optFns ...func(o *AccessKeysOptions)) *AccessKeysRecon

func (AccessKeysRecon) Errors added in v0.0.17

func (r AccessKeysRecon) Errors() []error

func (AccessKeysRecon) Run added in v0.0.17

func (r AccessKeysRecon) Run() []T

type AfterRunHookFunc added in v0.0.13

type AfterRunHookFunc = func(ctx context.Context, service string, region string) context.Context

type BeforeHookFunc added in v0.0.13

type BeforeHookFunc = func(ctx context.Context, service string, regions []string) context.Context

type Bucket

type Bucket struct {
	AWSService   string
	Region       string
	Name         string
	CreationDate time.Time
	Audit        *bucket.Audit
	Hints        []string
}

type BucketsOptions

type BucketsOptions struct {
	Names        []string
	BeforeHook   BeforeHookFunc
	AfterRunHook AfterRunHookFunc
}

type BucketsRecon

type BucketsRecon struct {
	// contains filtered or unexported fields
}

func NewBucketsRecon

func NewBucketsRecon(cfg *config.Config, optFns ...func(o *BucketsOptions)) *BucketsRecon

func (BucketsRecon) Errors

func (r BucketsRecon) Errors() []error

func (BucketsRecon) Run

func (r BucketsRecon) Run() []T

type Endpoint

type Endpoint struct {
	AWSService string
	Region     string
	Name       string
	Type       string
	Endpoint   string
	Port       int32
	Protocol   string
	Visibility Visibility
	Hints      []string
}

type EndpointsOptions added in v0.0.10

type EndpointsOptions struct {
	IgnoreServices []string
	BeforeHook     BeforeHookFunc
	AfterRunHook   AfterRunHookFunc
}

type EndpointsRecon

type EndpointsRecon struct {
	// contains filtered or unexported fields
}

func NewEndpointsRecon

func NewEndpointsRecon(cfg *config.Config, optFns ...func(o *EndpointsOptions)) *EndpointsRecon

func (EndpointsRecon) Errors

func (r EndpointsRecon) Errors() []error

func (EndpointsRecon) Run

func (r EndpointsRecon) Run() []T

type Env

type Env struct {
	AWSService string
	Region     string
	Name       string
	Key        string
	Value      string
	Entropy    float64
	Hints      []string
}

type EnvsOptions

type EnvsOptions struct {
	Entropy              float64
	Verify               bool
	HighEntropyThreshold float64
	IgnoreServices       []string
	BeforeHook           BeforeHookFunc
	AfterRunHook         AfterRunHookFunc
}

type EnvsRecon

type EnvsRecon struct {
	// contains filtered or unexported fields
}

func NewEnvsRecon

func NewEnvsRecon(cfg *config.Config, optFns ...func(o *EnvsOptions)) *EnvsRecon

func (EnvsRecon) Errors

func (r EnvsRecon) Errors() []error

func (EnvsRecon) Run

func (r EnvsRecon) Run() []T

type FileSystem added in v0.0.10

type FileSystem struct {
	AWSService string
	Region     string
	Name       string
	DNS        string
	IP         string
	Mount      string
	Hints      []string
}

type FileSystemsOptions added in v0.0.10

type FileSystemsOptions struct {
	IgnoreServices []string
	BeforeHook     BeforeHookFunc
	AfterRunHook   AfterRunHookFunc
}

type FileSystemsRecon added in v0.0.10

type FileSystemsRecon struct {
	// contains filtered or unexported fields
}

func NewFileSystemsRecon added in v0.0.10

func NewFileSystemsRecon(cfg *config.Config, optFns ...func(o *FileSystemsOptions)) *FileSystemsRecon

func (FileSystemsRecon) Errors added in v0.0.10

func (r FileSystemsRecon) Errors() []error

func (FileSystemsRecon) Run added in v0.0.10

func (r FileSystemsRecon) Run() []T

type Function added in v0.0.11

type Function struct {
	AWSService string
	Region     string
	Name       string
	Runtime    string
	Hints      []string
}

type FunctionsOptions added in v0.0.11

type FunctionsOptions struct {
	Names        []string
	BeforeHook   BeforeHookFunc
	AfterRunHook AfterRunHookFunc
}

type FunctionsRecon added in v0.0.11

type FunctionsRecon struct {
	// contains filtered or unexported fields
}

func NewFunctionsRecon added in v0.0.11

func NewFunctionsRecon(cfg *config.Config, optFns ...func(o *FunctionsOptions)) *FunctionsRecon

func (FunctionsRecon) Errors added in v0.0.11

func (r FunctionsRecon) Errors() []error

func (FunctionsRecon) Run added in v0.0.11

func (r FunctionsRecon) Run() []T

type IMDS

type IMDS string
const (
	IMDSDisabled IMDS = "disabled"
	IMDSv1       IMDS = "v1"
	IMDSv2       IMDS = "v2"
)

type Instance

type Instance struct {
	AWSService        string
	Region            string
	ID                string
	Name              string
	State             string
	VPCID             string
	AvailabilityZone  string
	PublicIP          string
	PrivateIP         string
	SGAudit           *securitygroup.Audit
	Platform          string
	Architecture      string
	InstanceType      string
	NitroEnclaveState string
	UserDataState     string
	IMDS              IMDS
	InstanceProfile   string
	Hints             []string
}

type InstancesOptions

type InstancesOptions struct {
	InstanceStates       []string
	Verify               bool
	HighEntropyThreshold float64
	MyIP                 net.IP
	BeforeHook           BeforeHookFunc
	AfterRunHook         AfterRunHookFunc
}

type InstancesRecon

type InstancesRecon struct {
	// contains filtered or unexported fields
}

func NewInstancesRecon

func NewInstancesRecon(cfg *config.Config, optFns ...func(o *InstancesOptions)) *InstancesRecon

func (InstancesRecon) Errors

func (r InstancesRecon) Errors() []error

func (InstancesRecon) Run

func (r InstancesRecon) Run() []T

type Log added in v0.0.9

type Log struct {
	AWSService string
	Region     string
	GroupName  string
	StreamName string
	Encrypted  bool
	Retention  string
	EventCount int
	Hints      []string
}

type LogsOptions added in v0.0.9

type LogsOptions struct {
	GroupNamePrefix  string
	StreamNamePrefix string
	FilterPattern    string
	StartTime        int64
	EndTime          int64
	Verify           bool
	BeforeHook       BeforeHookFunc
	AfterRunHook     AfterRunHookFunc
}

type LogsRecon added in v0.0.9

type LogsRecon struct {
	// contains filtered or unexported fields
}

func NewLogsRecon added in v0.0.9

func NewLogsRecon(cfg *config.Config, optFns ...func(o *LogsOptions)) *LogsRecon

func (LogsRecon) Errors added in v0.0.9

func (r LogsRecon) Errors() []error

func (LogsRecon) Run added in v0.0.9

func (r LogsRecon) Run() []T

type Output

type Output struct {
	Description string
	ExportName  string
	Key         string
	Value       string
	Entropy     float64
	Hints       []string
}

type Parameter

type Parameter struct {
	Key           string
	Value         string
	ResolvedValue string
	Entropy       float64
	Hints         []string
}

type Principal

type Principal struct {
	AWSService       string
	Type             string
	ARN              string
	Name             string
	AttachedPolicies []iamTypes.AttachedPolicy
	InlinePolicies   []iamTypes.PolicyDetail
	Findings         []string
}

type PrincipalsOptions added in v0.0.13

type PrincipalsOptions struct {
	IgnoreServices []string
	BeforeHook     BeforeHookFunc
	AfterRunHook   AfterRunHookFunc
}

type PrincipalsRecon

type PrincipalsRecon struct {
	// contains filtered or unexported fields
}

func NewPrincipalsRecon

func NewPrincipalsRecon(cfg *config.Config, optFns ...func(o *PrincipalsOptions)) (*PrincipalsRecon, error)

func (PrincipalsRecon) Errors

func (r PrincipalsRecon) Errors() []error

func (PrincipalsRecon) Run

func (r PrincipalsRecon) Run() []T

type Record

type Record struct {
	AWSService  string
	Zone        string
	Name        string
	Type        string
	Value       string
	PrivateZone bool
	Hints       []string
}

type RecordsOptions

type RecordsOptions struct {
	Verify       bool
	BeforeHook   BeforeHookFunc
	AfterRunHook AfterRunHookFunc
}

type RecordsRecon

type RecordsRecon struct {
	// contains filtered or unexported fields
}

func NewRecordsRecon

func NewRecordsRecon(cfg *config.Config, optFns ...func(o *RecordsOptions)) *RecordsRecon

func (RecordsRecon) Errors

func (r RecordsRecon) Errors() []error

func (RecordsRecon) Run

func (r RecordsRecon) Run() []T

type Repo

type Repo struct {
	AWSService   string
	Region       string
	Name         string
	CloneURLHTTP string
}

type ReposOptions

type ReposOptions struct {
	Entropy              float64
	Verify               bool
	HighEntropyThreshold float64
	BeforeHook           BeforeHookFunc
	AfterRunHook         AfterRunHookFunc
}

type ReposRecon

type ReposRecon struct {
	// contains filtered or unexported fields
}

func NewReposRecon

func NewReposRecon(cfg *config.Config, optFns ...func(o *ReposOptions)) *ReposRecon

func (ReposRecon) Errors

func (r ReposRecon) Errors() []error

func (ReposRecon) Run

func (r ReposRecon) Run() []T

type Resource

type Resource struct {
	Name  string
	Type  string
	Hints []string
}

type RoleTrust added in v0.0.20

type RoleTrust struct {
	AWSService     string
	RoleName       string
	RoleARN        string
	CreateDate     time.Time
	LastUsedDate   time.Time
	LastUsedRegion string
	Principal      string
	TrustedEntity  string
	ExternalID     string
	Hints          []string
}

type RoleTrustsOptions added in v0.0.20

type RoleTrustsOptions struct {
	IgnoreServiceLinkRoles bool
	BeforeHook             BeforeHookFunc
	AfterRunHook           AfterRunHookFunc
}

type RoleTrustsRecon added in v0.0.20

type RoleTrustsRecon struct {
	// contains filtered or unexported fields
}

func NewRoleTrustsRecon added in v0.0.20

func NewRoleTrustsRecon(cfg *config.Config, optFns ...func(o *RoleTrustsOptions)) *RoleTrustsRecon

func (RoleTrustsRecon) Errors added in v0.0.20

func (r RoleTrustsRecon) Errors() []error

func (RoleTrustsRecon) Run added in v0.0.20

func (r RoleTrustsRecon) Run() []T

type Secret

type Secret struct {
	AWSService  string
	Region      string
	Name        string
	Description string
	Type        string
	Value       string
	Entropy     float64
	Hints       []string
}

type SecretsOptions

type SecretsOptions struct {
	Entropy              float64
	WithDecryption       bool
	Verify               bool
	HighEntropyThreshold float64
	IgnoreServices       []string
	BeforeHook           BeforeHookFunc
	AfterRunHook         AfterRunHookFunc
}

type SecretsRecon

type SecretsRecon struct {
	// contains filtered or unexported fields
}

func NewSecretsRecon

func NewSecretsRecon(cfg *config.Config, optFns ...func(o *SecretsOptions)) *SecretsRecon

func (SecretsRecon) Errors

func (r SecretsRecon) Errors() []error

func (SecretsRecon) Run

func (r SecretsRecon) Run() []T

type Stack

type Stack struct {
	AWSService   string
	Region       string
	Name         string
	Role         string
	Outputs      []*Output
	Parameters   []*Parameter
	Resources    []*Resource
	TemplateBody string
}

type StacksOptions

type StacksOptions struct {
	Entropy                  float64
	Verify                   bool
	HighEntropyThreshold     float64
	IgnoreCDKAssetParameters bool
	BeforeHook               BeforeHookFunc
	AfterRunHook             AfterRunHookFunc
}

type StacksRecon

type StacksRecon struct {
	// contains filtered or unexported fields
}

func NewStacksRecon

func NewStacksRecon(cfg *config.Config, optFns ...func(o *StacksOptions)) *StacksRecon

func (StacksRecon) Errors

func (r StacksRecon) Errors() []error

func (StacksRecon) Run

func (r StacksRecon) Run() []T

type Tag

type Tag struct {
	AWSService string
	Region     string
	ARN        string
	Name       string
	Type       string
	Key        string
	Value      string
	Entropy    float64
	Hints      []string
}

type TagsOptions

type TagsOptions struct {
	Entropy              float64
	Verify               bool
	HighEntropyThreshold float64
	BeforeHook           BeforeHookFunc
	AfterRunHook         AfterRunHookFunc
}

type TagsRecon

type TagsRecon struct {
	// contains filtered or unexported fields
}

func NewTagsRecon

func NewTagsRecon(cfg *config.Config, optFns ...func(o *TagsOptions)) *TagsRecon

func (TagsRecon) Errors

func (r TagsRecon) Errors() []error

func (TagsRecon) Run

func (r TagsRecon) Run() []T

type Visibility

type Visibility string
const (
	VisibilityPublic  Visibility = "public"
	VisibiltyPrivate  Visibility = "private"
	VisibilityUnknown Visibility = "unknown"
)

Jump to

Keyboard shortcuts

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