Documentation
¶
Overview ¶
Package exec provides execution primitives for the agent implant.
Techniques:
- Shell command execution (cmd.exe / PowerShell)
- BOF (Beacon Object File) loader — runs COFF .o in-process
- .NET / CLR in-memory hosting (CLRCreateInstance)
- PowerShell runspace (IPC via named pipe)
- LOLBin execution helpers (certutil, mshta, wmic, etc.)
- Alternate Data Stream (ADS) write + execute
- PE reflective loader
- Token / privilege manipulation
- Timegate / OPSEC scheduling
Mixed dependency: BOF/peloader use winsyscall; shell/lolbin use exec.Command.
Index ¶
- func AdsExec(path string) (string, error)
- func AdsRead(path string) ([]byte, error)
- func AdsWrite(path string, data []byte) error
- func DotnetExecute(assemblyPath, typeName, methodName, argument string) (int32, error)
- func ImpersonateToken(_ uint32) (string, error)
- func LolbinFetch(url, localPath, method string) error
- func MakeToken(_, _, _ string) error
- func MaskedSleep(duration time.Duration, _ []byte)
- func PeLoad(rawPE []byte) (uintptr, error)
- func PsEncode(command string) string
- func PsRunspace(psScript, bridgePath string) (string, error)
- func RevertToSelf() error
- func RunCommand(method, command string, timeout int) (stdout, stderr string, exitCode int)
- func StegoEncodeJPEG(carrierPath, outPath string, shellcode []byte, key byte, quality int) error
- func StegoEncodePNG(carrierPath, outPath string, shellcode []byte, key byte) error
- func StegoExtract(imagePath string, key byte) ([]byte, error)
- func StegoExtractAndRun(imagePath string, key byte) error
- func TokenListText(_ []TokenInfo) string
- type BOFResult
- type TimeGate
- type TokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DotnetExecute ¶
func ImpersonateToken ¶
func LolbinFetch ¶
func MaskedSleep ¶
func PsRunspace ¶
func RevertToSelf ¶
func RevertToSelf() error
func RunCommand ¶
RunCommand executes a shell command on non-Windows platforms.
func StegoEncodeJPEG ¶
func StegoEncodePNG ¶
func StegoExtractAndRun ¶
func TokenListText ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.