MCPcopy Create free account

hub / github.com/Antonlovesdnb/TTPRunner / functions

Functions192 in github.com/Antonlovesdnb/TTPRunner

↓ 1 callersFunctionextractTechniqueContext
(content: string, techniqueId: string)
packages/api/src/parser/markdown.ts:82
↓ 1 callersMethodextractUrlFromCommand
* Extract a URL from a download command (Invoke-WebRequest, wget, curl).
packages/api/src/executor/agent.ts:1565
↓ 1 callersFunctionfindAvailableIp
(config: any)
packages/api/src/routes/vectr.ts:995
↓ 1 callersFunctionfindDownloadButton
* Find a "download" button in a page snapshot.
packages/api/src/executor/browser.ts:350
↓ 1 callersFunctionfindRelatedTools
( objects: StixObject[], attackPatternId: string, allTools: string[] )
packages/api/src/parser/stix.ts:135
↓ 1 callersFunctionfindTarget
(text: string)
packages/api/src/routes/analyze.ts:410
↓ 1 callersFunctiongetAllowedOrigins
()
packages/api/src/index.ts:16
↓ 1 callersFunctiongetImageDimensions
* Extract width/height from a PNG or PPM image buffer.
packages/api/src/executor/qmp-input.ts:336
↓ 1 callersFunctiongetImageWidth
* Get image width using ImageMagick identify.
packages/api/src/proxmox/screenshot.ts:273
↓ 1 callersFunctiongetPngDimensions
(buffer: Buffer)
packages/api/src/executor/qmp-input.ts:351
↓ 1 callersFunctiongetPpmDimensions
(header: string)
packages/api/src/executor/qmp-input.ts:360
↓ 1 callersMethodgetSshConnectOptions
Build SSH connection options from config (supports key or password)
packages/api/src/proxmox/client.ts:314
↓ 1 callersFunctiongetTacticForTechnique
(techniqueId: string)
packages/api/src/lib/mitre.ts:145
↓ 1 callersFunctiongetTechniqueName
(techniqueId: string)
packages/api/src/parser/markdown.ts:243
↓ 1 callersMethodinferExecutor
* Infer whether a Windows command should run in cmd or powershell. * Commands using cmd-style syntax (slashes for flags, native cmd builtins) use c
packages/api/src/executor/agent.ts:1412
↓ 1 callersFunctioninitDatabase
()
packages/api/src/db.ts:9
↓ 1 callersMethodinstallDesktopEnvironment
* Install a lightweight desktop environment (XFCE + LightDM + xterm) on a * headless Linux VM so QMP screenshots can capture GUI evidence. * Use
packages/api/src/executor/agent.ts:467
↓ 1 callersMethodinstallMissingTool
* Attempt to install a missing CLI tool on a Linux target. * Only installs tools on an allowlist to prevent arbitrary package installation. * Wi
packages/api/src/executor/agent.ts:1772
↓ 1 callersFunctionisDirWritable
Check if a directory is writable by attempting a temp file write
packages/api/src/routes/notes.ts:9
↓ 1 callersMethodisMissingTool
* Detect "command not found" errors and extract the missing tool name.
packages/api/src/executor/agent.ts:1745
↓ 1 callersFunctionlaunchBrowserOnVM
(target: Target)
packages/api/src/executor/browser.ts:48
↓ 1 callersMethodlinkArtifactToTestCase
(db: string, testCaseId: string, artifactId: number)
packages/api/src/output/vectr.ts:368
↓ 1 callersMethodlistCampaigns
(db: string, assessmentId: string)
packages/api/src/output/vectr.ts:163
↓ 1 callersFunctionnormalizeModeValue
(mode: string | undefined)
packages/api/src/routes/analyze.ts:165
↓ 1 callersFunctionparseGitHubUrl
* Parse a GitHub URL to extract owner/repo for navigating to releases. * Handles patterns like: * https://github.com/owner/repo/releases/download/
packages/api/src/executor/browser.ts:155
↓ 1 callersFunctionparseMarkdown
(content: string)
packages/api/src/parser/markdown.ts:35
↓ 1 callersFunctionparseOutputSteps
(output: string)
packages/api/src/routes/execution.ts:281
↓ 1 callersFunctionparsePdf
(buffer: Buffer, llmConfig: LlmConfig)
packages/api/src/parser/pdf.ts:18
↓ 1 callersFunctionparseStix
(content: string)
packages/api/src/parser/stix.ts:44
↓ 1 callersMethodplanExecution
( ttp: { technique: string; name: string; context: string; commands?: string[]; tools_mentioned?: string[]
packages/api/src/executor/agent.ts:1449
↓ 1 callersFunctionppmToPng
* Convert PPM P6 binary format to PNG using ImageMagick's `convert` command. * Falls back to raw PPM-to-PNG conversion if ImageMagick is not availabl
packages/api/src/proxmox/screenshot.ts:120
↓ 1 callersFunctionreplaceEnvVars
(obj: any)
packages/api/src/config.ts:142
↓ 1 callersFunctionresolveKeyPath
(keyPath: string)
packages/api/src/routes/setup.ts:196
↓ 1 callersFunctionresolveKeyPath
(keyPath: string)
packages/api/src/proxmox/bootstrap.ts:35
↓ 1 callersFunctionrunDeploy
(config: any, ip: string)
packages/api/src/routes/vectr.ts:601
↓ 1 callersFunctionrunStartVectr
(config: any)
packages/api/src/routes/vectr.ts:927
↓ 1 callersFunctionsendSingleKey
* Send a single key press (down+up) via QMP send-key.
packages/api/src/executor/qmp-input.ts:296
↓ 1 callersFunctionsetupRoutes
(app: Hono)
packages/api/src/routes/index.ts:13
↓ 1 callersFunctionsetupWireguardNat
* Detect WireGuard on Proxmox and add NAT masquerade so VPN clients * can reach lab VMs. Without this, responses from lab VMs to the WG * subnet get
packages/api/src/proxmox/bootstrap.ts:319
↓ 1 callersMethodshowResultOnVM
* Run the actual command in a visible terminal on the VM desktop. * * Opens a real terminal (cmd/PowerShell/xterm) and types the command directl
packages/api/src/executor/agent.ts:1080
↓ 1 callersFunctionsimpleAnalysis
(content: string, targets: any[])
packages/api/src/routes/analyze.ts:394
↓ 1 callersMethodstartVM
(vmid: number, type: 'qemu' | 'lxc' = 'qemu')
packages/api/src/proxmox/client.ts:199
↓ 1 callersMethodstop
()
packages/api/src/executor/agent.ts:68
↓ 1 callersFunctionstripShellBanner
* Strip shell banners and prompt noise from QMP command output. * PowerShell via QMP stdin includes the full banner + prompt on every command.
packages/api/src/proxmox/screenshot.ts:252
↓ 1 callersMethodsubscribe
(callback: EventCallback)
packages/api/src/events.ts:10
↓ 1 callersMethodtakeScreenshot
( target: Target, technique: string, cmdContext?: { command: string; stdout: string; stderr: strin
packages/api/src/executor/agent.ts:377
↓ 1 callersFunctiontcpCheck
Fast TCP port probe — resolves true/false, never throws
packages/api/src/routes/environment.ts:44
↓ 1 callersMethodtestConnection
()
packages/api/src/output/vectr.ts:81
↓ 1 callersFunctiontestLlmConnection
(provider: string, apiKey?: string, endpoint?: string, model?: string)
packages/api/src/routes/setup.ts:256
↓ 1 callersFunctiontestLlmQuick
Quick LLM API test — similar to setup.ts testLlmConnection but lightweight
packages/api/src/routes/environment.ts:253
↓ 1 callersFunctiontestSSH
(target: Target)
packages/api/src/executor/ssh.ts:15
↓ 1 callersFunctiontestSshConnection
(host: string, username: string, password?: string, keyPath?: string)
packages/api/src/routes/setup.ts:203
↓ 1 callersFunctiontestWinRM
(target: Target)
packages/api/src/executor/winrm.ts:13
↓ 1 callersFunctiontimingSafeEqual
(a: string, b: string)
packages/api/src/middleware/auth.ts:38
↓ 1 callersMethodtroubleshootDownload
* Diagnose and attempt to fix a failed download. * * Strategy: * 1. Quick CLI alternatives (certutil, BitsTransfer, TLS 1.2, wget/curl swap)
packages/api/src/executor/agent.ts:1605
↓ 1 callersMethodunlockScreen
* Unlock a locked screen on the target.
packages/api/src/executor/agent.ts:700
↓ 1 callersMethoduploadScreenshot
* Upload a screenshot as an execution artifact to VECTR, then link it to a test case. * VECTR encrypts files with libsodium before storage.
packages/api/src/output/vectr.ts:255
↓ 1 callersMethodwaitForSession
* Poll for a desktop session to become active after DM restart. * Returns true if session detected within maxSeconds.
packages/api/src/executor/agent.ts:945
↓ 1 callersMethodwakeDisplay
* Wake the display and reset screensaver. Uses broad XAUTHORITY search.
packages/api/src/executor/agent.ts:960
FunctioncallLLM
(messages: LlmMessage[], options?: LlmOptions)
packages/api/src/llm/provider.ts:21
Functionclose
(ws)
packages/api/src/index.ts:116
Methodconstructor
(baseUrl: string, apiKey: string)
packages/api/src/output/vectr.ts:50
Methodconstructor
( executionId: string, context: TTPContext, config: Config, selectedTtps: string[] | null,
packages/api/src/executor/agent.ts:54
Methodconstructor
(config: ProxmoxConfig)
packages/api/src/proxmox/client.ts:33
MethoddeployVectr
(options: { bridge: string; gateway: string; ip: string; })
packages/api/src/proxmox/client.ts:209
Functiondismiss
(id: number)
packages/ui/src/composables/useToast.ts:25
FunctiondownloadOnTarget
( target: Target, url: string, remotePath: string )
packages/api/src/executor/winrm.ts:165
FunctiondownloadOnTarget
( target: Target, url: string, remotePath: string )
packages/api/src/executor/ssh.ts:194
Methodemit
(data: any)
packages/api/src/events.ts:15
Functionerror
(message: string)
packages/ui/src/composables/useToast.ts:22
Functioninfo
(message: string)
packages/ui/src/composables/useToast.ts:23
MethodisLastCmd
(i: number)
packages/api/src/executor/agent.ts:224
Functionmessage
(ws, message)
packages/api/src/index.ts:112
Functionopen
(ws)
packages/api/src/index.ts:96
FunctionoverlayCommandOutput
( pngData: Buffer, command: string, output: string, exitCode: number, )
packages/api/src/proxmox/screenshot.ts:168
FunctionqmpDoubleClick
( host: string, vmid: number, x: number, y: number, sshUser = 'root', keyPath = '~/.ssh/id_rsa', )
packages/api/src/executor/qmp-input.ts:200
FunctionrequireAuth
(c: Context, next: Next)
packages/api/src/middleware/auth.ts:10
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/environment.ts:53
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/targets.ts:20
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/vectr.ts:47
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/reports.ts:9
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/analyze.ts:172
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/setup.ts:73
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/execution.ts:11
FunctionsetupRoutes
(app: Hono)
packages/api/src/routes/notes.ts:35
MethodstopVM
(vmid: number, type: 'qemu' | 'lxc' = 'qemu')
packages/api/src/proxmox/client.ts:204
MethodstripShellBanner
* Strip PowerShell/bash banner noise from QMP command output.
packages/api/src/executor/agent.ts:1182
Functionsuccess
(message: string)
packages/ui/src/composables/useToast.ts:21
FunctiontestQMP
(target: Target, proxmoxConfig?: ProxmoxConfig)
packages/api/src/executor/qmp.ts:85
FunctiontransferFileSCP
( target: Target, localPath: string, remotePath: string )
packages/api/src/executor/ssh.ts:125
FunctiontransferFileWinRM
( target: Target, localPath: string, remotePath: string )
packages/api/src/executor/winrm.ts:138
FunctionuseToast
()
packages/ui/src/composables/useToast.ts:12
← previous101–192 of 192, ranked by callers