utils

package
v0.0.0-...-8442212 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GTFOBinCategories = []string{
	"file-read",
	"file-write",
	"shell",
	"sudo",
	"file-upload",
	"file-download",
	"limited-suid",
	"library-load",
	"capabilities",
}
View Source
var LOLBASCategories = []string{
	"ads",
	"awl-bypass",
	"compile",
	"copy",
	"credentials",
	"decode",
	"download",
	"dump",
	"encode",
	"execute",
	"reconnaissance",
	"uac-bypass",
	"upload",
}

Functions

func CountGTFOBinsFiles

func CountGTFOBinsFiles() int

func CountLOLBASFiles

func CountLOLBASFiles() int

func GetGTFOBinsList

func GetGTFOBinsList() (map[string]*Function, error)

func GetLOLBASList

func GetLOLBASList() (map[string]*LOLBASContent, error)

func IsStringInList

func IsStringInList(target string, list []string) bool

func ReadFromFile

func ReadFromFile(file string) ([]string, error)

func ReadFromStdin

func ReadFromStdin() ([]string, error)

func SummaryGTFOBinTable

func SummaryGTFOBinTable(data []*Function) bytes.Buffer

func SummaryLOLBASTable

func SummaryLOLBASTable(data []*LOLBASContent) bytes.Buffer

Types

type Acknowledgement

type Acknowledgement struct {
	Person string `yaml:"Person" json:"Person" xml:"Person"`
	Handle string `yaml:"Handle" json:"Handle" xml:"Handle"`
}

type Category

type Category struct {
	Code        string `yaml:"code"        json:"code"        xml:"code"       `
	Description string `yaml:"description" json:"description" xml:"description"`
}

func GetGTFOBinCategory

func GetGTFOBinCategory(category string, list []*Function) []Category

type Commands

type Commands struct {
	Command         string `yaml:"Command"         json:"Command"         xml:"Command"`
	Description     string `yaml:"Description"     json:"Description"     xml:"Description"`
	Usecase         string `yaml:"Usecase"         json:"Usecase"         xml:"Usecase"`
	Category        string `yaml:"Category"        json:"Category"        xml:"Category"`
	Privileges      string `yaml:"Privileges"      json:"Privileges"      xml:"Privileges"`
	MitreID         string `yaml:"MitreID"         json:"MitreID"         xml:"MitreID"`
	OperatingSystem string `yaml:"OperatingSystem" json:"OperatingSystem" xml:"OperatingSystem"`
}

func GetLOLBASCategory

func GetLOLBASCategory(category string, list []*LOLBASContent) []Commands

type Detection

type Detection struct {
	Sigma     string `yaml:"Sigma" json:"Sigma" xml:"Sigma"`
	Elastic   string `yaml:"Elastic" json:"Elastic" xml:"Elastic"`
	Splunk    string `yaml:"Splunk" json:"Splunk" xml:"Splunk"`
	BlockRule string `yaml:"BlockRule" json:"BlockRule" xml:"BlockRule"`
	IOC       string `yaml:"IOC" json:"IOC" xml:"IOC"`
}

type FullPath

type FullPath struct {
	Path string `yaml:"Path" json:"Path" xml:"Path"`
}

type Function

type Function struct {
	Name         string     `yaml:"name"          json:"name"           xml:"name"`
	FileRead     []Category `yaml:"file-read"     json:"file-read"      xml:"file-read"`
	FileWrite    []Category `yaml:"file-write"    json:"file-write"     xml:"file-write"`
	Shell        []Category `yaml:"shell"         json:"shell"          xml:"shell"`
	Sudo         []Category `yaml:"sudo"          json:"sudo"           xml:"sudo"`
	FileUpload   []Category `yaml:"file-upload"   json:"file-upload"    xml:"file-upload"`
	FileDownload []Category `yaml:"file-download" json:"file-download"  xml:"file-download"`
	LimitedSuid  []Category `yaml:"limited-suid"  json:"limited-suid"   xml:"limited-suid"`
	LibraryLoad  []Category `yaml:"library-load"  json:"library-load"   xml:"library-load"`
	Capabilities []Category `yaml:"capabilities"  json:"capabilities"   xml:"capabilities"`
}

type GTFOBinContent

type GTFOBinContent struct {
	Functions Function `yaml:"functions" json:"functions" xml:"functions"`
}

type LOLBASContent

type LOLBASContent struct {
	Name            string            `yaml:"Name"           json:"Name"             xml:"Name"`
	Author          string            `yaml:"Author"          json:"Author"          xml:"Author"`
	Description     string            `yaml:"Description"     json:"Description"     xml:"Description"`
	Created         string            `yaml:"Created"         json:"Created"         xml:"Created"`
	Commands        []Commands        `yaml:"Commands"        json:"Commands"        xml:"Commands"`
	FullPath        []FullPath        `yaml:"Full_Path"       json:"Full_Path"       xml:"Full_Path"`
	Detection       []Detection       `yaml:"Detection"       json:"Detection"       xml:"Detection"`
	Resources       []Resources       `yaml:"Resources"       json:"Resources"       xml:"Resources"`
	Acknowledgement []Acknowledgement `yaml:"Acknowledgement" json:"Acknowledgement" xml:"Acknowledgement"`
}

type Resources

type Resources struct {
	Path string `yaml:"Link" json:"Link" xml:"Link"`
}

Jump to

Keyboard shortcuts

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