consts

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinTimeout                  = time.Duration(30 * time.Second)
	KB                          = 1024
	MB                          = KB * 1024
	GB                          = MB * 1024
	BufSize                     = 2 * MB
	ClientMaxReceiveMessageSize = 256 * MB
	// ServerMaxMessageSize - Server-side max GRPC message size
	ServerMaxMessageSize = 2 * GB
	DefaultTimeout       = 10 // second
	DefaultDuration      = time.Duration(DefaultTimeout * time.Second)
)

Default config

View Source
const (
	GenericGroup   = "generic"
	ImplantGroup   = "implant"
	AliasesGroup   = "alias"
	ExtensionGroup = "extension"
	ListenerGroup  = "listener"
)

Group

View Source
const (
	MaxPacketLength = "server.config.packet_length"
	AuditLevel      = "server.audit"
)

config

View Source
const (
	UnknownFile = iota
	EXEFile
	DLLFile
)
View Source
const (
	DefaultMaxBodyLength   = 2 * 1024 * 1024 * 1024 // 2Gb
	DefaultHTTPTimeout     = time.Minute
	DefaultLongPollTimeout = time.Second
	DefaultLongPollJitter  = time.Second

	DefaultCacheJitter = 60 * 60
)

Time

View Source
const (
	EventJoin         = "join"
	EventLeft         = "left"
	EventBroadcast    = "broadcast"
	EventNotify       = "notify"
	EventPipeline     = "pipeline"
	EventSession      = "session"
	EventListener     = "listener"
	EventTaskCallback = "task_callback"
	EventTaskDone     = "task_done"
	EventTaskError    = "task_error"
	EventWebsite      = "website"
)

event

View Source
const (
	MaleficErrorPanic uint32 = 1 + iota
	MaleficErrorUnpackError
	MaleficErrorMissbody
	MaleficErrorModuleError
	MaleficErrorModuleNotFound
	MaleficErrorTaskError
	MaleficErrorTaskNotFound
	MaleficErrorTaskOperatorNotFound
	MaleficErrorExtensionNotFound
	MaleficErrorUnexceptBody
)

Malefic Error

View Source
const (
	ModuleUpdate           = "update"
	ModuleExecution        = "exec"
	ModuleExecuteAssembly  = "execute_assembly"
	ModuleInlineAssembly   = "inline_assembly"
	ModuleExecuteShellcode = "execute_shellcode"
	ModuleInlineShellcode  = "inline_shellcode"
	ModuleExecutePE        = "execute_pe"
	ModuleInlinePE         = "inline_pe"
	ModuleExecuteDll       = "execute_dll"
	ModuleInlineDll        = "inline_dll"
	ModuleExecuteBof       = "bof"
	ModulePowershell       = "powershell"
	ModuleUpload           = "upload"
	ModuleDownload         = "download"
	ModulePwd              = "pwd"
	ModuleLs               = "ls"
	ModuleCd               = "cd"
	ModuleMv               = "mv"
	ModuleMkdir            = "mkdir"
	ModuleRm               = "rm"
	ModuleCat              = "cat"
	ModulePs               = "ps"
	ModuleCp               = "cp"
	ModuleChmod            = "chmod"
	ModuleChown            = "chown"
	ModuleKill             = "kill"
	ModuleWhoami           = "whoami"
	ModuleEnv              = "env"
	ModuleSetEnv           = "setenv"
	ModuleUnsetEnv         = "unsetenv"
	ModuleInfo             = "info"
	ModuleNetstat          = "netstat"
	ModuleCurl             = "curl"
	ModuleListModule       = "list_module"
	ModuleLoadModule       = "load_module"
	ModuleListExtension    = "list_extension"
	ModuleLoadExtension    = "load_extension"
	ModuleExecuteExtension = "execute_extension"
)

client module and command

View Source
const (
	CommandSync             = "sync"
	CommandBroadcast        = "broadcast"
	CommandVersion          = "version"
	CommandNotify           = "notify"
	CommandAlias            = "alias"
	CommandAliasLoad        = "load"
	CommandAliasInstall     = "install"
	CommandAliasRemove      = "remove"
	CommandArmory           = "armory"
	CommandArmoryUpdate     = "update"
	CommandArmorySearch     = "search"
	CommandArmoryLoad       = "load"
	CommandExtension        = "extension"
	CommandExtensionList    = "list"
	CommandExtensionLoad    = "load"
	CommandExtensionInstall = "install"
	CommandExtensionRemove  = "remove"
)
View Source
const (
	CtrlPipelineStart = 0 + iota
	CtrlPipelineStop
	CtrlWebsiteStart = 0 + iota
	CtrlWebsiteStop
)

ctrl type

View Source
const (
	CtrlStatusSuccess = 0 + iota
	CtrlStatusFailed
)

ctrl status

View Source
const (
	TaskErrorOperatorError       = 2
	TaskErrorNotExpectBody       = 3
	TaskErrorFieldRequired       = 4
	TaskErrorFieldLengthMismatch = 5
	TaskErrorFieldInvalid        = 6
	TaskError                    = 99
)

task error

View Source
const (
	ClientPrompt = "IoM"
)

UI

Variables

View Source
var (
	WindowsVer = map[string]string{
		"5.0.2195": "2000",
		"5.1.2600": "XP",

		"5.2.3790": "Server 2003/Server 2003 R2",

		"6.0.6000":   "Vista",
		"6.0.6001":   "Vista SP1/Server2008",
		"6.0.6002":   "Vista SP2/Server2008 SP2",
		"6.1.0":      "7/Server2008 R2",
		"6.1.7600":   "7/Server2008 R2",
		"6.1.7601":   "7 SP1/Server2008 R2 SP1",
		"6.2.9200":   "8/Server2012",
		"6.3.9600":   "8.1/Server2012 R2",
		"10.0.10240": "10 1507",
		"10.0.10586": "10 1511",
		"10.0.14393": "10 1607/Server2016",
		"10.0.15063": "10 1703",
		"10.0.16299": "10 1709",
		"10.0.17134": "10 1803",
		"10.0.17763": "10 1809/Server2019",
		"10.0.18362": "10 1903",
		"10.0.18363": "10 1909",
		"10.0.19041": "10 2004/Server2004",
		"10.0.19042": "10 20H2/Server20H2",
		"10.0.19043": "10 21H2",
		"10.0.20348": "Server2022",
		"10.0.22621": "11",
		"11.0.22000": "11",
	}

	WindowsArch = map[string]string{
		"x86_64": "amd64",
		"x86":    "386",
	}
)

Functions

func GetWindowsArch

func GetWindowsArch(arch string) string

func GetWindowsVer

func GetWindowsVer(ver string) string

Types

type ReleaseType

type ReleaseType int

release type

const (
	ReleaseWinWorkstation ReleaseType = 1 + iota
	ReleaseWinDomainController
	ReleaseWinServer
	ReleaseMacOSX
	ReleaseUbuntu
	ReleaseCentos
)

Jump to

Keyboard shortcuts

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