Documentation
¶
Index ¶
- Variables
- func CreateRegKeyAndValue(regHive string, keyPath string, keyObject string, keyValue interface{}) error
- func DNSQuestion(target, request string) (string, error)
- func DeleteRegKeysValue(regHive string, keypath string, keyobject string) error
- func DeobfuscateString(Data string) string
- func FindProcessPid(key string) (int, error)
- func ForkExecuteCommand(c string, args ...string) (int, error)
- func GetHostname() (string, error)
- func GetLocalIPs() []string
- func HTTPGetFile(url string) (int, []byte, error)
- func InjectIntoProc(shellcode string, proccessID int64) error
- func LocalCopyFile(src, dst string) error
- func LocalDirCreate(path string) error
- func LocalDirRemoveAll(dir string) error
- func LocalFileAppendBytes(filename string, bytes []byte) error
- func LocalFileAppendString(input, filename string) error
- func LocalFileCreate(path string, bytes []byte) error
- func LocalFileDelete(path string) error
- func LocalFileExists(path string) bool
- func LocalFileRead(path string) ([]byte, error)
- func LocalFileReplace(file, match, replacement string) error
- func LocalFileReplaceMulti(file string, matches []string, replacement string) error
- func LocalSystemInfo() ([]string, error)
- func ObfuscateString(Data string) string
- func ProcExists2(pidBoi int) bool
- func QueryRegKeyString(regHive string, keypath string, keyobject string) (string, error)
- func RandString(strlen int) string
- func RandStringRunes(n int) string
- func RandomInt(min, max int) int
- func StripSpaces(str string) string
- func TCPRead(ip, port string) ([]byte, error)
- func TCPWrite(writeData []byte, ip, port string) ([]byte, error)
- func UDPWrite(writeData []byte, ip, port string) error
- func XorBytes(a []byte, b []byte) []byte
- func XorFiles(file1 string, file2 string, outPut string) error
- type Engine
- func (e *Engine) AddImport(name string, data func() []byte)
- func (e *Engine) CreateVM()
- func (e *Engine) CurrentUser() map[string]string
- func (e *Engine) ExecutePlan() error
- func (e *Engine) InjectVars()
- func (e *Engine) InstallSystemService(path, name, displayName, description string) error
- func (e *Engine) LoadScript(source []byte) error
- func (e *Engine) RemoveServiceByName(name string) error
- func (e *Engine) RunAfterDeploy() error
- func (e *Engine) RunBeforeDeploy() error
- func (e *Engine) RunDeploy() error
- func (e *Engine) RunOnError() error
- func (e *Engine) RunWithTimeout(command string) (otto.Value, error)
- func (e *Engine) SetLogger(logger *logrus.Logger)
- func (e *Engine) SetName(name string)
- func (e *Engine) SetTimeout(timeout int)
- func (e *Engine) StartServiceByName(name string) error
- func (e *Engine) StopServiceByName(name string) error
- func (e *Engine) VMAddRegKey(call otto.FunctionCall) otto.Value
- func (e *Engine) VMAppendFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMAsset(call otto.FunctionCall) otto.Value
- func (e *Engine) VMB64Decode(call otto.FunctionCall) otto.Value
- func (e *Engine) VMB64Encode(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCPUStats(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanExecFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanMakeHTTPConn(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanMakeTCPConn(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanPing(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanReadFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanSSHLogin(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanSudo(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCanWriteFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCmdSuccessful(call otto.FunctionCall) otto.Value
- func (e *Engine) VMCopyFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMDNSQuery(call otto.FunctionCall) otto.Value
- func (e *Engine) VMDelRegKey(call otto.FunctionCall) otto.Value
- func (e *Engine) VMDeleteFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMDetectSSLMITM(call otto.FunctionCall) otto.Value
- func (e *Engine) VMDirExists(call otto.FunctionCall) otto.Value
- func (e *Engine) VMEnvVars(call otto.FunctionCall) otto.Value
- func (e *Engine) VMExec(call otto.FunctionCall) otto.Value
- func (e *Engine) VMExecuteFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMExistsInPath(call otto.FunctionCall) otto.Value
- func (e *Engine) VMExpectedDNS(call otto.FunctionCall) otto.Value
- func (e *Engine) VMFileAccessTime(call otto.FunctionCall) otto.Value
- func (e *Engine) VMFileBirthTime(call otto.FunctionCall) otto.Value
- func (e *Engine) VMFileChangeTime(call otto.FunctionCall) otto.Value
- func (e *Engine) VMFileContains(call otto.FunctionCall) otto.Value
- func (e *Engine) VMFileExists(call otto.FunctionCall) otto.Value
- func (e *Engine) VMFileModifyTime(call otto.FunctionCall) otto.Value
- func (e *Engine) VMForkExec(call otto.FunctionCall) otto.Value
- func (e *Engine) VMGetDirsInPath(call otto.FunctionCall) otto.Value
- func (e *Engine) VMGetEnv(call otto.FunctionCall) otto.Value
- func (e *Engine) VMGetHostname(call otto.FunctionCall) otto.Value
- func (e *Engine) VMGetTweet(call otto.FunctionCall) otto.Value
- func (e *Engine) VMHTTPRequest(call otto.FunctionCall) otto.Value
- func (e *Engine) VMHalt(call otto.FunctionCall) otto.Value
- func (e *Engine) VMHasPublicIP(call otto.FunctionCall) otto.Value
- func (e *Engine) VMImplode(call otto.FunctionCall) otto.Value
- func (e *Engine) VMInstallSystemService(call otto.FunctionCall) otto.Value
- func (e *Engine) VMIsAWS(call otto.FunctionCall) otto.Value
- func (e *Engine) VMIsVM(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLocalUserExists(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLogCrit(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLogDebug(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLogError(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLogInfo(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLogTester(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLogWarn(call otto.FunctionCall) otto.Value
- func (e *Engine) VMLoggedInUsers(call otto.FunctionCall) otto.Value
- func (e *Engine) VMMD5(call otto.FunctionCall) otto.Value
- func (e *Engine) VMMatches(call otto.FunctionCall) otto.Value
- func (e *Engine) VMMemStats(call otto.FunctionCall) otto.Value
- func (e *Engine) VMProcExistsWithName(call otto.FunctionCall) otto.Value
- func (e *Engine) VMQueryRegKey(call otto.FunctionCall) otto.Value
- func (e *Engine) VMReadFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMRemoveServiceByName(call otto.FunctionCall) otto.Value
- func (e *Engine) VMReplaceInFile(call otto.FunctionCall) otto.Value
- func (e *Engine) VMRetrieveFileFromURL(call otto.FunctionCall) otto.Value
- func (e *Engine) VMSHA1(call otto.FunctionCall) otto.Value
- func (e *Engine) VMSSHCmd(call otto.FunctionCall) otto.Value
- func (e *Engine) VMServeFileOverHTTP(call otto.FunctionCall) otto.Value
- func (e *Engine) VMShellcodeExec(call otto.FunctionCall) otto.Value
- func (e *Engine) VMSignal(call otto.FunctionCall) otto.Value
- func (e *Engine) VMStartServiceByName(call otto.FunctionCall) otto.Value
- func (e *Engine) VMStopServiceByName(call otto.FunctionCall) otto.Value
- func (e *Engine) VMTCPPortInUse(call otto.FunctionCall) otto.Value
- func (e *Engine) VMTimestamp(call otto.FunctionCall) otto.Value
- func (e *Engine) VMUDPPortInUse(call otto.FunctionCall) otto.Value
- func (e *Engine) VMUsersRunningProcs(call otto.FunctionCall) otto.Value
- func (e *Engine) VMWriteFile(call otto.FunctionCall) otto.Value
- func (e *Engine) ValueToByteSlice(v otto.Value) []byte
- type VMExecResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Debugger = true
)
View Source
var VMPreload = `` /* 1236-byte string literal not displayed */
Functions ¶
func CreateRegKeyAndValue ¶
func DNSQuestion ¶
func DeleteRegKeysValue ¶
func DeobfuscateString ¶
func FindProcessPid ¶
func GetHostname ¶
func GetLocalIPs ¶
func GetLocalIPs() []string
func InjectIntoProc ¶
func LocalCopyFile ¶
func LocalDirCreate ¶
func LocalDirRemoveAll ¶
func LocalFileAppendBytes ¶
func LocalFileAppendString ¶
func LocalFileCreate ¶
func LocalFileDelete ¶
func LocalFileExists ¶
func LocalFileRead ¶
func LocalFileReplace ¶
func LocalFileReplaceMulti ¶
func LocalSystemInfo ¶
func ObfuscateString ¶
func ProcExists2 ¶
func QueryRegKeyString ¶
func RandString ¶
func RandStringRunes ¶
func StripSpaces ¶
Types ¶
type Engine ¶
type Engine struct { VM *otto.Otto Logger *logrus.Logger Imports map[string]func() []byte Name string DebuggerEnabled bool Timeout int Halted bool }
func (*Engine) CurrentUser ¶
func (*Engine) ExecutePlan ¶
func (*Engine) InjectVars ¶
func (e *Engine) InjectVars()
func (*Engine) InstallSystemService ¶ added in v0.0.10
func (*Engine) LoadScript ¶
func (*Engine) RemoveServiceByName ¶ added in v0.0.10
func (*Engine) RunAfterDeploy ¶
func (*Engine) RunBeforeDeploy ¶
func (*Engine) RunOnError ¶
func (*Engine) RunWithTimeout ¶ added in v0.0.10
func (*Engine) SetTimeout ¶ added in v0.0.10
func (*Engine) StartServiceByName ¶ added in v0.0.10
func (*Engine) StopServiceByName ¶ added in v0.0.10
func (*Engine) VMAddRegKey ¶
func (e *Engine) VMAddRegKey(call otto.FunctionCall) otto.Value
func (*Engine) VMAppendFile ¶
func (e *Engine) VMAppendFile(call otto.FunctionCall) otto.Value
func (*Engine) VMB64Decode ¶
func (e *Engine) VMB64Decode(call otto.FunctionCall) otto.Value
func (*Engine) VMB64Encode ¶
func (e *Engine) VMB64Encode(call otto.FunctionCall) otto.Value
func (*Engine) VMCPUStats ¶
func (e *Engine) VMCPUStats(call otto.FunctionCall) otto.Value
func (*Engine) VMCanExecFile ¶
func (e *Engine) VMCanExecFile(call otto.FunctionCall) otto.Value
func (*Engine) VMCanMakeHTTPConn ¶
func (e *Engine) VMCanMakeHTTPConn(call otto.FunctionCall) otto.Value
func (*Engine) VMCanMakeTCPConn ¶
func (e *Engine) VMCanMakeTCPConn(call otto.FunctionCall) otto.Value
func (*Engine) VMCanReadFile ¶
func (e *Engine) VMCanReadFile(call otto.FunctionCall) otto.Value
func (*Engine) VMCanSSHLogin ¶
func (e *Engine) VMCanSSHLogin(call otto.FunctionCall) otto.Value
func (*Engine) VMCanWriteFile ¶
func (e *Engine) VMCanWriteFile(call otto.FunctionCall) otto.Value
func (*Engine) VMCmdSuccessful ¶
func (e *Engine) VMCmdSuccessful(call otto.FunctionCall) otto.Value
func (*Engine) VMCopyFile ¶
func (e *Engine) VMCopyFile(call otto.FunctionCall) otto.Value
func (*Engine) VMDNSQuery ¶
func (e *Engine) VMDNSQuery(call otto.FunctionCall) otto.Value
func (*Engine) VMDelRegKey ¶
func (e *Engine) VMDelRegKey(call otto.FunctionCall) otto.Value
func (*Engine) VMDeleteFile ¶
func (e *Engine) VMDeleteFile(call otto.FunctionCall) otto.Value
func (*Engine) VMDetectSSLMITM ¶
func (e *Engine) VMDetectSSLMITM(call otto.FunctionCall) otto.Value
func (*Engine) VMDirExists ¶
func (e *Engine) VMDirExists(call otto.FunctionCall) otto.Value
func (*Engine) VMExecuteFile ¶
func (e *Engine) VMExecuteFile(call otto.FunctionCall) otto.Value
func (*Engine) VMExistsInPath ¶
func (e *Engine) VMExistsInPath(call otto.FunctionCall) otto.Value
func (*Engine) VMExpectedDNS ¶
func (e *Engine) VMExpectedDNS(call otto.FunctionCall) otto.Value
func (*Engine) VMFileAccessTime ¶
func (e *Engine) VMFileAccessTime(call otto.FunctionCall) otto.Value
func (*Engine) VMFileBirthTime ¶
func (e *Engine) VMFileBirthTime(call otto.FunctionCall) otto.Value
func (*Engine) VMFileChangeTime ¶
func (e *Engine) VMFileChangeTime(call otto.FunctionCall) otto.Value
func (*Engine) VMFileContains ¶
func (e *Engine) VMFileContains(call otto.FunctionCall) otto.Value
func (*Engine) VMFileExists ¶
func (e *Engine) VMFileExists(call otto.FunctionCall) otto.Value
func (*Engine) VMFileModifyTime ¶
func (e *Engine) VMFileModifyTime(call otto.FunctionCall) otto.Value
func (*Engine) VMForkExec ¶
func (e *Engine) VMForkExec(call otto.FunctionCall) otto.Value
func (*Engine) VMGetDirsInPath ¶
func (e *Engine) VMGetDirsInPath(call otto.FunctionCall) otto.Value
func (*Engine) VMGetHostname ¶
func (e *Engine) VMGetHostname(call otto.FunctionCall) otto.Value
func (*Engine) VMGetTweet ¶
func (e *Engine) VMGetTweet(call otto.FunctionCall) otto.Value
func (*Engine) VMHTTPRequest ¶
func (e *Engine) VMHTTPRequest(call otto.FunctionCall) otto.Value
func (*Engine) VMHasPublicIP ¶
func (e *Engine) VMHasPublicIP(call otto.FunctionCall) otto.Value
func (*Engine) VMInstallSystemService ¶ added in v0.0.10
func (e *Engine) VMInstallSystemService(call otto.FunctionCall) otto.Value
func (*Engine) VMLocalUserExists ¶
func (e *Engine) VMLocalUserExists(call otto.FunctionCall) otto.Value
func (*Engine) VMLogDebug ¶
func (e *Engine) VMLogDebug(call otto.FunctionCall) otto.Value
func (*Engine) VMLogError ¶
func (e *Engine) VMLogError(call otto.FunctionCall) otto.Value
func (*Engine) VMLogTester ¶ added in v0.0.10
func (e *Engine) VMLogTester(call otto.FunctionCall) otto.Value
func (*Engine) VMLoggedInUsers ¶
func (e *Engine) VMLoggedInUsers(call otto.FunctionCall) otto.Value
func (*Engine) VMMemStats ¶
func (e *Engine) VMMemStats(call otto.FunctionCall) otto.Value
func (*Engine) VMProcExistsWithName ¶
func (e *Engine) VMProcExistsWithName(call otto.FunctionCall) otto.Value
func (*Engine) VMQueryRegKey ¶
func (e *Engine) VMQueryRegKey(call otto.FunctionCall) otto.Value
func (*Engine) VMReadFile ¶
func (e *Engine) VMReadFile(call otto.FunctionCall) otto.Value
func (*Engine) VMRemoveServiceByName ¶ added in v0.0.10
func (e *Engine) VMRemoveServiceByName(call otto.FunctionCall) otto.Value
func (*Engine) VMReplaceInFile ¶
func (e *Engine) VMReplaceInFile(call otto.FunctionCall) otto.Value
func (*Engine) VMRetrieveFileFromURL ¶
func (e *Engine) VMRetrieveFileFromURL(call otto.FunctionCall) otto.Value
func (*Engine) VMServeFileOverHTTP ¶
func (e *Engine) VMServeFileOverHTTP(call otto.FunctionCall) otto.Value
func (*Engine) VMShellcodeExec ¶
func (e *Engine) VMShellcodeExec(call otto.FunctionCall) otto.Value
func (*Engine) VMStartServiceByName ¶ added in v0.0.10
func (e *Engine) VMStartServiceByName(call otto.FunctionCall) otto.Value
func (*Engine) VMStopServiceByName ¶ added in v0.0.10
func (e *Engine) VMStopServiceByName(call otto.FunctionCall) otto.Value
func (*Engine) VMTCPPortInUse ¶
func (e *Engine) VMTCPPortInUse(call otto.FunctionCall) otto.Value
func (*Engine) VMTimestamp ¶
func (e *Engine) VMTimestamp(call otto.FunctionCall) otto.Value
func (*Engine) VMUDPPortInUse ¶
func (e *Engine) VMUDPPortInUse(call otto.FunctionCall) otto.Value
func (*Engine) VMUsersRunningProcs ¶
func (e *Engine) VMUsersRunningProcs(call otto.FunctionCall) otto.Value
func (*Engine) VMWriteFile ¶
func (e *Engine) VMWriteFile(call otto.FunctionCall) otto.Value
type VMExecResponse ¶
type VMExecResponse struct { Stdout []string `json:"stdout"` Stderr []string `json:"stderr"` Success bool `json:"success"` PID int `json:"pid"` ErrorMsg string `json:"error_message"` }
func ExecuteCommand ¶
func ExecuteCommand(c string, args ...string) VMExecResponse
Click to show internal directories.
Click to hide internal directories.