Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DistroTypeStrings = [...]string{"Ubuntu", "CentOS", "Debian"}
DistroTypeStrings is the string version of enum DistroType
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct { Name string Type ArtifactType SourcePath string SupportedKernels []KernelMask Qemu struct { Cpus int Memory int Timeout Duration } Docker struct { Timeout Duration } Mitigations struct { DisableSmep bool DisableSmap bool DisableKaslr bool DisableKpti bool } Preload []PreloadModule }
Artifact is for .out-of-tree.toml
func ReadArtifactConfig ¶
ReadArtifactConfig is for read .out-of-tree.toml
type ArtifactType ¶
type ArtifactType int
ArtifactType is the kernel module or exploit
const ( // KernelModule is any kind of kernel module KernelModule ArtifactType = iota // KernelExploit is the privilege escalation exploit KernelExploit )
func (ArtifactType) MarshalTOML ¶
func (at ArtifactType) MarshalTOML() (data []byte, err error)
MarshalTOML is for support github.com/naoina/toml
func (ArtifactType) String ¶
func (at ArtifactType) String() string
func (*ArtifactType) UnmarshalTOML ¶
func (at *ArtifactType) UnmarshalTOML(data []byte) (err error)
UnmarshalTOML is for support github.com/naoina/toml
type DistroType ¶
type DistroType int
DistroType is enum with all supported distros
const ( // Ubuntu https://ubuntu.com/ Ubuntu DistroType = iota // CentOS https://www.centos.org/ CentOS // Debian https://www.debian.org/ Debian )
func NewDistroType ¶
func NewDistroType(dType string) (dt DistroType, err error)
NewDistroType is create new Distro object
func (DistroType) MarshalTOML ¶
func (dt DistroType) MarshalTOML() (data []byte, err error)
MarshalTOML is for support github.com/naoina/toml
func (DistroType) String ¶
func (dt DistroType) String() string
func (*DistroType) UnmarshalTOML ¶
func (dt *DistroType) UnmarshalTOML(data []byte) (err error)
UnmarshalTOML is for support github.com/naoina/toml
type DockerCommand ¶ added in v1.1.0
type DockerCommand struct { DistroType DistroType Command string }
type Duration ¶
Duration type with toml unmarshalling support
func (Duration) MarshalTOML ¶
MarshalTOML for Duration
func (*Duration) UnmarshalTOML ¶
UnmarshalTOML for Duration
type KernelConfig ¶
type KernelConfig struct {
Kernels []KernelInfo
}
KernelConfig is the ~/.out-of-tree/kernels.toml configuration description
func ReadKernelConfig ¶
func ReadKernelConfig(path string) (kernelCfg KernelConfig, err error)
ReadKernelConfig is for read kernels.toml
type KernelInfo ¶
type KernelInfo struct { DistroType DistroType DistroRelease string // 18.04/7.4.1708/9.1 // Must be *exactly* same as in `uname -r` KernelRelease string // Build-time information KernelSource string // module/exploit will be build on host ContainerName string // Runtime information KernelPath string InitrdPath string RootFS string // Debug symbols VmlinuxPath string }
KernelInfo defines kernels.toml entries
type KernelMask ¶
type KernelMask struct { DistroType DistroType DistroRelease string // 18.04/7.4.1708/9.1 ReleaseMask string // Overrides ReleaseMask Kernel kernel }
KernelMask defines the kernel
func (KernelMask) DockerName ¶
func (km KernelMask) DockerName() string
DockerName is returns stable name for docker container
type OutOfTree ¶ added in v1.1.0
type OutOfTree struct { Kernels string UserKernels string Database string Qemu struct { Timeout string } Docker struct { Timeout string Registry string // Commands that will be executed before // the base layer of Dockerfile Commands []DockerCommand } }