MCPcopy Create free account

hub / github.com/Antonlovesdnb/TTPRunner / functions

Functions192 in github.com/Antonlovesdnb/TTPRunner

↓ 134 callersMethodlog
(message: string, level: 'info' | 'warn' | 'error' | 'debug' = 'info')
packages/api/src/executor/agent.ts:92
↓ 29 callersFunctionexecCommand
(conn: Client, command: string)
packages/api/src/proxmox/bootstrap.ts:580
↓ 26 callersFunctionloadConfig
()
packages/api/src/config.ts:88
↓ 25 callersMethodexecuteAsRoot
* Execute a command as root on a Linux VM via guest agent. * Unlike executeCommand/executeViaQMP which wraps in `su - <user>`, * this runs direc
packages/api/src/executor/agent.ts:101
↓ 22 callersFunctionfetch
(req, server)
packages/api/src/index.ts:81
↓ 21 callersMethodexecuteCommand
( target: Target, cmd: { command: string; executor: string }, )
packages/api/src/executor/agent.ts:1544
↓ 21 callersFunctiongetDb
()
packages/api/src/db.ts:109
↓ 21 callersMethodrun
()
packages/api/src/executor/agent.ts:107
↓ 21 callersFunctionsetDeployStep
(step: string)
packages/api/src/routes/vectr.ts:32
↓ 20 callersFunctiongetConfig
()
packages/api/src/config.ts:129
↓ 19 callersMethodescapeGraphQL
(str: string)
packages/api/src/output/vectr.ts:395
↓ 18 callersMethodsshExec
* Execute a command on the Proxmox host itself via SSH. * For operations that need root access (pveam, pct create, etc.)
packages/api/src/proxmox/client.ts:383
↓ 16 callersMethodexecInContainer
* Execute a command inside an LXC container via SSH to the Proxmox host. * Runs: pct exec <ctid> -- bash -c '<command>'
packages/api/src/proxmox/client.ts:391
↓ 15 callersMethodapiRequest
(method: string, path: string, body?: any)
packages/api/src/proxmox/client.ts:46
↓ 15 callersFunctioncacheResult
(key: string, result: CheckGroupResult)
packages/api/src/routes/environment.ts:21
↓ 14 callersFunctionqmpKey
( host: string, vmid: number, key: string, sshUser = 'root', keyPath = '~/.ssh/id_rsa', )
packages/api/src/executor/qmp-input.ts:272
↓ 11 callersMethodemit
(event: Omit<ExecutionEvent, 'timestamp'>)
packages/api/src/executor/agent.ts:72
↓ 9 callersFunctionclearConfigCache
()
packages/api/src/config.ts:138
↓ 9 callersFunctionrunAgentBrowser
( vmIp: string, args: string[], timeout = AGENT_BROWSER_TIMEOUT, )
packages/api/src/executor/browser.ts:116
↓ 8 callersFunctionqmpType
( host: string, vmid: number, text: string, sshUser = 'root', keyPath = '~/.ssh/id_rsa', delay = 3
packages/api/src/executor/qmp-input.ts:235
↓ 8 callersMethodrequest
(query: string, variables?: Record<string, any>)
packages/api/src/output/vectr.ts:55
↓ 8 callersFunctionsaveConfig
(config: Config)
packages/api/src/config.ts:110
↓ 6 callersMethoddisableScreenLocking
* Disable screen locking and power-saving sleep/blank on the target. * Prevents the screen from re-locking during long executions.
packages/api/src/executor/agent.ts:598
↓ 6 callersFunctionemitProgress
(step: string)
packages/api/src/routes/analyze.ts:7
↓ 6 callersFunctionexecOnTarget
* Execute a command on the target VM using the best available method.
packages/api/src/executor/browser.ts:30
↓ 5 callersFunctioncallLLM
(prompt: string, config: LlmConfig)
packages/api/src/parser/pdf.ts:81
↓ 5 callersFunctionexecuteWinRM
( target: Target, command: string, options: { executor?: 'powershell' | 'cmd'; timeout?: number;
packages/api/src/executor/winrm.ts:27
↓ 5 callersFunctiongetCredentialsForTarget
(targets: any[], targetName: string)
packages/api/src/utils/credentials.ts:20
↓ 5 callersFunctiongroupStatus
Resolve overall group status from individual checks
packages/api/src/routes/environment.ts:36
↓ 5 callersMethodisDownloadFailure
(result: { stdout: string; stderr: string; exitCode: number })
packages/api/src/executor/agent.ts:1876
↓ 5 callersFunctionrandomKey
(len: number)
packages/api/src/routes/vectr.ts:777
↓ 5 callersMethodsetDisplayResolution
* Set the guest display to a higher resolution for better QMP screenshots. * Called once per target after the desktop session is confirmed active.
packages/api/src/executor/agent.ts:975
↓ 5 callersFunctionsubstituteCredentials
(cmd: string, creds: TargetCreds)
packages/api/src/utils/credentials.ts:45
↓ 4 callersFunctionexecuteSSH
( target: Target, command: string, options: { timeout?: number; cwd?: string; } = {} )
packages/api/src/executor/ssh.ts:23
↓ 4 callersMethodgetVMStatus
(vmid: number)
packages/api/src/proxmox/client.ts:90
↓ 4 callersMethodlistOrganizations
()
packages/api/src/output/vectr.ts:104
↓ 4 callersMethodlistVMs
()
packages/api/src/proxmox/client.ts:75
↓ 4 callersFunctionnormalizeWindowsBackslashes
(cmd: string)
packages/api/src/utils/credentials.ts:86
↓ 4 callersFunctionsendQmpCommand
( host: string, vmid: number, command: string, args: Record<string, any> = {}, sshUser = 'root', k
packages/api/src/executor/qmp-input.ts:80
↓ 3 callersFunctionaddToast
(message: string, type: Toast['type'] = 'info', duration = 4000)
packages/ui/src/composables/useToast.ts:13
↓ 3 callersMethodcreateAssessment
(name: string, db: string, orgId: string)
packages/api/src/output/vectr.ts:142
↓ 3 callersMethodcreateCampaign
(name: string, db: string, assessmentId: string, orgId: string)
packages/api/src/output/vectr.ts:182
↓ 3 callersMethoddetectDisplayManager
* Detect which display manager is running on a Linux target.
packages/api/src/executor/agent.ts:431
↓ 3 callersFunctionexecuteViaQMP
( target: Target, command: string, options: { executor?: 'powershell' | 'cmd' | 'bash'; timeout?
packages/api/src/executor/qmp.ts:19
↓ 3 callersFunctionfindTargetsMentioned
(context: string)
packages/api/src/parser/markdown.ts:107
↓ 3 callersFunctionfindToolsMentioned
(context: string)
packages/api/src/parser/markdown.ts:102
↓ 3 callersFunctionisLikelyContainerOnlyPath
Check if a path is inside a Docker container (not mounted from host)
packages/api/src/routes/notes.ts:24
↓ 3 callersMethodisScreenLocked
* Detect whether the screen is currently locked on the target.
packages/api/src/executor/agent.ts:661
↓ 3 callersMethodlistAssessments
(db: string)
packages/api/src/output/vectr.ts:123
↓ 3 callersFunctionpyEscape
(s: string)
packages/api/src/executor/winrm.ts:44
↓ 3 callersFunctionrateLimit
(maxRequests: number, windowMs: number)
packages/api/src/middleware/rateLimit.ts:25
↓ 3 callersFunctionspawnCheck
Spawn a local binary and check if it exists / extract version
packages/api/src/routes/environment.ts:301
↓ 2 callersFunctionbuttonName
(button: number)
packages/api/src/executor/qmp-input.ts:213
↓ 2 callersFunctioncallOpenAICompatible
( url: string, apiKey: string, model: string, messages: LlmMessage[], options: LlmOptions | undefine
packages/api/src/llm/provider.ts:118
↓ 2 callersFunctioncaptureScreenshotQMP
( host: string, vmid: number, sshUser = 'root', keyPath = '~/.ssh/id_rsa', )
packages/api/src/proxmox/screenshot.ts:28
↓ 2 callersFunctioncheckDownloadExists
* Check if a file matching the filename exists in the default download directory.
packages/api/src/executor/browser.ts:393
↓ 2 callersMethodcloseTerminalOnVM
* Close the evidence terminal window after screenshot capture. * Types 'exit' via QMP keyboard — the terminal is the active window at this * poi
packages/api/src/executor/agent.ts:1147
↓ 2 callersMethodcreateTestCase
(db: string, campaignId: string, orgId: string, testCase: TestCaseInput)
packages/api/src/output/vectr.ts:204
↓ 2 callersMethodexecOnVM
* Execute a command on a QEMU VM via the guest agent * Requires qemu-guest-agent running inside the VM
packages/api/src/proxmox/client.ts:117
↓ 2 callersMethodfallbackPlan
( ttp: { technique: string; name: string }, target: Target )
packages/api/src/executor/agent.ts:1518
↓ 2 callersFunctionfindBestAssetLink
* Parse an agent-browser snapshot and find the ref for the best matching asset link. * Returns the ref string (e.g., "@ref=12") or null.
packages/api/src/executor/browser.ts:314
↓ 2 callersMethodfindBestTarget
(ttp: { technique: string; context: string })
packages/api/src/executor/agent.ts:1317
↓ 2 callersMethodgetScreenshot
* Take a screenshot of a QEMU VM via QMP screendump over SSH. * Captures the virtual display directly at the hypervisor level — * works regardle
packages/api/src/proxmox/client.ts:185
↓ 2 callersFunctionisConfigured
()
packages/api/src/config.ts:124
↓ 2 callersMethodlistDatabases
()
packages/api/src/output/vectr.ts:87
↓ 2 callersFunctionmoveDownloadToPath
* Move a downloaded file from the browser's download directory to the target path.
packages/api/src/executor/browser.ts:427
↓ 2 callersFunctionqmpClick
( host: string, vmid: number, x: number, y: number, sshUser = 'root', keyPath = '~/.ssh/id_rsa',
packages/api/src/executor/qmp-input.ts:149
↓ 2 callersMethodqmpKeyboardLogin
* Legacy QMP keyboard login — fallback when auto-login via DM config fails. * Types username/password via QMP keyboard input.
packages/api/src/executor/agent.ts:766
↓ 2 callersFunctionresetDeployState
()
packages/api/src/routes/vectr.ts:28
↓ 2 callersMethodrunSshCommand
Run a command via SSH and resolve with stdout, reject on non-zero exit
packages/api/src/proxmox/client.ts:339
↓ 2 callersFunctionsendKeyCombo
* Send a key combination (hold all keys, release) via QMP send-key.
packages/api/src/executor/qmp-input.ts:312
↓ 2 callersMethoduploadScreenshotsForTestCase
* Upload multiple screenshots for a test case. Reads PNGs from disk, * uploads each via uploadScreenshot, and returns aggregate results. * Indiv
packages/api/src/output/vectr.ts:336
↓ 2 callersFunctionwaitAndMoveDownload
* Wait for a download to appear in the browser's download directory, then move it.
packages/api/src/executor/browser.ts:368
↓ 1 callersMethodautoSyncToVectr
()
packages/api/src/executor/agent.ts:1195
↓ 1 callersFunctionbootstrapProxmox
( host: string, node: string, username: string, password?: string, keyPath?: string )
packages/api/src/proxmox/bootstrap.ts:42
↓ 1 callersFunctionbuildAssetPatterns
* Build patterns to match the correct release asset for this OS. * E.g., for "mimikatz.zip" on Windows, match patterns like: * mimikatz, .zip, win
packages/api/src/executor/browser.ts:297
↓ 1 callersFunctioncallAnthropic
(llm: LlmConfig, messages: LlmMessage[], options?: LlmOptions)
packages/api/src/llm/provider.ts:43
↓ 1 callersFunctioncallOllama
(llm: LlmConfig, messages: LlmMessage[], options?: LlmOptions)
packages/api/src/llm/provider.ts:160
↓ 1 callersFunctioncallOpenAI
(llm: LlmConfig, messages: LlmMessage[], options?: LlmOptions)
packages/api/src/llm/provider.ts:88
↓ 1 callersFunctioncallOpenRouter
(llm: LlmConfig, messages: LlmMessage[], options?: LlmOptions)
packages/api/src/llm/provider.ts:103
↓ 1 callersMethodcheckRequiredVMs
* Pre-flight check: resolve which VMs the execution plan needs and verify * they are all running via the Proxmox API. Returns false if any required
packages/api/src/executor/agent.ts:1341
↓ 1 callersMethodcleanupTarget
* Clean up temp files and terminal windows left on a target VM. * Called once per target after all TTPs are done.
packages/api/src/executor/agent.ts:1169
↓ 1 callersFunctioncloseBrowserOnVM
(target: Target)
packages/api/src/executor/browser.ts:473
↓ 1 callersMethodconfigureAutoLogin
* Configure auto-login on the display manager so DM restart logs in * without QMP keyboard interaction. Writes config files as root. * Installs
packages/api/src/executor/agent.ts:532
↓ 1 callersFunctionconfigureVMDisplays
* Configure VirtIO VGA + EDID on QEMU VMs so QMP screendump captures * at 1920x1080 instead of the default 1024x768. Skips VMs that already * have t
packages/api/src/proxmox/bootstrap.ts:269
↓ 1 callersMethodconsultLLM
* Consult the LLM after a command failure to decide whether to retry with * a modified command, skip remaining commands, or continue as-is. * Co
packages/api/src/executor/agent.ts:1822
↓ 1 callersFunctiondetectBridgeNetworks
* Detect Linux bridge interfaces on Proxmox and return their * subnet + gateway info. Parses `ip -j addr show` for vmbr* interfaces.
packages/api/src/proxmox/bootstrap.ts:396
↓ 1 callersFunctiondetectFileType
(filename: string)
packages/api/src/routes/reports.ts:157
↓ 1 callersFunctiondetectLabNetwork
* Auto-detect lab network configuration from VMs: * 1. Find most common non-vmbr0 bridge * 2. Extract VLAN tag from VM configs on that bridge * 3.
packages/api/src/proxmox/bootstrap.ts:476
↓ 1 callersFunctiondownloadDirect
* Navigate directly to a URL and attempt download.
packages/api/src/executor/browser.ts:259
↓ 1 callersFunctiondownloadFromGitHub
* Navigate to GitHub releases and download the correct asset.
packages/api/src/executor/browser.ts:210
↓ 1 callersFunctiondownloadViaBrowser
( target: Target, url: string, destPath: string, )
packages/api/src/executor/browser.ts:183
↓ 1 callersMethodensureDesktopSession
* Ensure the target VM has an active, unlocked desktop session so QMP * screenshots capture meaningful content. * * First call per target: on
packages/api/src/executor/agent.ts:834
↓ 1 callersMethodensureDisplayReady
* Lightweight pre-screenshot display check. Called before every screenshot * to ensure the display is awake and not locked. Fast and idempotent.
packages/api/src/executor/agent.ts:1044
↓ 1 callersFunctionevictStaleCache
()
packages/api/src/routes/environment.ts:26
↓ 1 callersMethodexecuteTTP
(ttp: { technique: string; name: string; context: string; commands?: string[]; tools_menti
packages/api/src/executor/agent.ts:170
↓ 1 callersFunctionextractCommands
(output: string)
packages/api/src/routes/vectr.ts:986
↓ 1 callersMethodextractDestPath
* Extract the destination file path from a download command.
packages/api/src/executor/agent.ts:1582
↓ 1 callersFunctionextractFilename
* Extract the filename from a URL or destination path.
packages/api/src/executor/browser.ts:164
↓ 1 callersFunctionextractFromHeadings
(content: string)
packages/api/src/parser/markdown.ts:131
next →1–100 of 192, ranked by callers