Skip to main content

Cyberstrike is now open source! AI-powered penetration testing for security professionals. Star on GitHub

Tools Reference

Cyberstrike provides a comprehensive set of built-in tools for security assessments. These tools enable file operations, command execution, web automation, and persistent memory across sessions.

📸 SCREENSHOT: s11-tool-list.png

Tool listesi - TUI’da mevcut araçların görünümü

Tool Categories

CategoryToolsPurpose
File OperationsRead, Write, Edit, Glob, GrepFile reading, writing, editing, and searching
Command ExecutionBashShell command execution
Web AutomationBrowserPlaywright-based browser control with traffic capture
MemoryMemory Search, Memory Write, Memory ReadPersistent storage across sessions
Tool DiscoveryToolSearch, LoadTools, UnloadToolsDynamic MCP tool loading
TasksTask, TodoWrite, TodoReadTask management and tracking
WebWebFetch, WebSearch, CodeSearchWeb content fetching and search

File Operations

Read

Reads file contents with line numbers. Supports text files, images, and PDFs.

Parameters

ParameterTypeRequiredDescription
filePathstringYesPath to the file (absolute or relative)
offsetnumberNoLine number to start from (0-based)
limitnumberNoNumber of lines to read (default: 2000)

Example

{
"filePath": "/path/to/file.txt",
"offset": 100,
"limit": 500
}

Output Format

00001| First line of content
00002| Second line of content
00003| Third line of content
(End of file - total 3 lines)

Features

  • Automatic binary file detection
  • Image and PDF support (returns base64 encoded content)
  • Line truncation at 2000 characters
  • Maximum 50KB per read operation
  • Smart file suggestions on not found errors

Write

Creates or overwrites a file with new content.

Parameters

ParameterTypeRequiredDescription
filePathstringYesAbsolute path to the file
contentstringYesContent to write

Example

{
"filePath": "/path/to/new-file.txt",
"content": "File contents here"
}

Features

  • Creates parent directories if needed
  • Generates unified diff for review
  • LSP diagnostics after write
  • File time tracking for conflict detection

Edit

Performs find-and-replace operations on files with smart matching.

Parameters

ParameterTypeRequiredDescription
filePathstringYesAbsolute path to the file
oldStringstringYesText to find and replace
newStringstringYesReplacement text
replaceAllbooleanNoReplace all occurrences (default: false)

Example

{
"filePath": "/path/to/file.ts",
"oldString": "function oldName(",
"newString": "function newName(",
"replaceAll": false
}

Smart Matching

The Edit tool uses multiple matching strategies:

  1. Simple Replacement: Exact string match
  2. Line Trimmed: Ignores leading/trailing whitespace per line
  3. Block Anchor: Matches first and last lines, fuzzy middle
  4. Whitespace Normalized: Collapses multiple spaces
  5. Indentation Flexible: Ignores indentation differences
  6. Escape Normalized: Handles escape sequences
  7. Context Aware: Uses surrounding context for matching

Features

  • Unified diff generation
  • LSP diagnostics after edit
  • Multiple occurrence detection
  • Conflict prevention via file time tracking

Glob

Finds files matching a glob pattern.

Parameters

ParameterTypeRequiredDescription
patternstringYesGlob pattern (e.g., **/*.ts)
pathstringNoDirectory to search (default: current directory)

Example

{
"pattern": "**/*.{ts,tsx}",
"path": "/path/to/project"
}

Output

Returns file paths sorted by modification time (newest first), limited to 100 results.

Pattern Examples

PatternMatches
*.tsTypeScript files in current directory
**/*.tsTypeScript files recursively
src/**/*.{ts,tsx}TS/TSX files in src directory
!**/node_modules/**Exclude node_modules

Grep

Searches file contents using regex patterns. Built on ripgrep.

Parameters

ParameterTypeRequiredDescription
patternstringYesRegex pattern to search
pathstringNoDirectory to search (default: current directory)
includestringNoFile pattern filter (e.g., *.js)

Example

{
"pattern": "password|secret|api_key",
"path": "/path/to/project",
"include": "*.{js,ts,py}"
}

Output Format

Found 5 matches
/path/to/file.ts:
Line 42: const apiKey = process.env.API_KEY
Line 85: // TODO: remove hardcoded secret
/path/to/config.js:
Line 12: password: "changeme"

Features

  • Regex support (ripgrep syntax)
  • Hidden file search
  • Symlink following
  • Results sorted by modification time
  • Maximum 100 results

Command Execution

Bash

Executes shell commands with timeout and output capture.

Parameters

ParameterTypeRequiredDescription
commandstringYesCommand to execute
timeoutnumberNoTimeout in milliseconds (default: 120000)
workdirstringNoWorking directory
descriptionstringYesBrief description of command purpose

Example

{
"command": "nmap -sV -sC target.com",
"timeout": 300000,
"workdir": "/path/to/project",
"description": "Scan target for open ports and services"
}

Features

  • Shell detection (bash/zsh/sh)
  • Process tree killing on timeout
  • Permission system integration
  • Real-time output streaming
  • External directory access control

Security Considerations

Commands are parsed with tree-sitter to detect:

  • Directory access outside project
  • Dangerous command patterns
  • File system modifications

Web Automation

🎬 GIF: g06-browser-scanning.gif

Browser aracı ile web tarama demosu (25s)

Browser

Playwright-based browser automation with full traffic capture for security testing.

Parameters

ParameterTypeRequiredDescription
actionstringYesBrowser action to perform
urlstringConditionalURL for navigate action
scriptstringConditionalJavaScript for execute action
selectorstringConditionalCSS selector for click/fill/screenshot
valuestringConditionalValue for fill action
fullPagebooleanNoFull page screenshot (default: true)
timeoutnumberNoTimeout in ms (default: 30000)
filterobjectNoFilter for network logs

Actions

ActionDescription
launchStart browser with traffic capture
navigateGo to URL
screenshotCapture screenshot
executeRun JavaScript
networkView captured traffic
harExport HAR file
consoleView console logs
clickClick element
fillFill form field
waitWait for element or network idle
contentGet page content, links, forms
statusGet current page status
closeClose browser and save HAR

Example Session

// Launch browser
{ "action": "launch" }
// Navigate to target
{ "action": "navigate", "url": "https://target.com/login" }
// Fill login form
{ "action": "fill", "selector": "#username", "value": "admin" }
{ "action": "fill", "selector": "#password", "value": "test123" }
// Click submit
{ "action": "click", "selector": "button[type=submit]" }
// Check network traffic for credentials
{ "action": "network", "filter": { "method": "POST" } }
// Export HAR for analysis
{ "action": "har" }
// Close browser
{ "action": "close" }

Network Filter Options

{
"filter": {
"urlPattern": "/api/",
"method": "POST",
"statusCode": 200,
"resourceType": "xhr"
}
}

Features

  • Full HTTP traffic capture
  • HAR file export
  • Console log capture
  • JavaScript execution
  • Form interaction
  • Screenshot capture
  • Cyberstrike banner injection for identification

Memory System

Cyberstrike includes a persistent memory system for storing context across sessions.

Memory Write

Stores information to persistent memory.

Parameters

ParameterTypeRequiredDescription
contentstringYesContent to store
typestringNolong_term for MEMORY.md, daily for dated notes
titlestringNoOptional heading for the entry

Example

{
"content": "Target uses PostgreSQL 14.2 on port 5432",
"type": "long_term",
"title": "Database Configuration"
}

Memory Types

TypeStoragePurpose
long_term.cyberstrike/MEMORY.mdDecisions, preferences, important facts
daily.cyberstrike/memory/YYYY-MM-DD.mdSession notes, temporary context

Searches through stored memory.

Parameters

ParameterTypeRequiredDescription
querystringYesSearch keywords or phrases

Example

{
"query": "database credentials"
}

Memory Read

Reads specific memory files.

Parameters

ParameterTypeRequiredDescription
filestringYesFile identifier

File Identifiers

IdentifierDescription
long_termLong-term memory (MEMORY.md)
todayToday’s daily notes
yesterdayYesterday’s notes
YYYY-MM-DDSpecific date’s notes
listList all memory files

Memory Context

Retrieves full memory context for the session.

Parameters

None required.

Example

{}

Returns combined long-term memory and recent daily notes.


Dynamic Tool Loading

📊 DIAGRAM: tool-interaction-flow.mermaid

Araç etkileşim diyagramı - Tool → Agent → Provider akışı

Cyberstrike supports dynamic tool loading for MCP (Model Context Protocol) servers. This enables access to hundreds of tools without overwhelming the context window.

Searches available MCP tools by capability.

Parameters

ParameterTypeRequiredDescription
querystringYesCapability description
limitnumberNoMaximum results (default: 5)

Example

{
"query": "sql injection testing",
"limit": 10
}

Output

Found 3 tools:
1. sqlmap_scan
SQL injection scanner using sqlmap
Estimated tokens: ~500
2. nuclei_sqli
Nuclei templates for SQL injection
Estimated tokens: ~300
3. manual_sqli
Manual SQL injection payloads
Estimated tokens: ~200

Load Tools

Loads tools into context for use.

Parameters

ParameterTypeRequiredDescription
tool_idsstring[]YesTool IDs from search results

Example

{
"tool_ids": ["sqlmap_scan", "nuclei_sqli"]
}

Unload Tools

Removes tools from context to free budget.

Parameters

ParameterTypeRequiredDescription
tool_idsstring[]YesTool IDs to unload

List Loaded Tools

Shows currently loaded tools and token usage.

Parameters

None required.


Task Management

Task

Creates and manages sub-tasks for complex operations.

Parameters

ParameterTypeRequiredDescription
descriptionstringYesTask description
promptstringYesDetailed instructions

TodoWrite

Writes task items to a todo list.

Parameters

ParameterTypeRequiredDescription
tasksarrayYesArray of task objects

Task Object

{
"id": "1",
"content": "Scan for open ports",
"status": "pending",
"priority": "high"
}

TodoRead

Reads current todo list.

Parameters

None required.


Web Tools

WebFetch

Fetches and processes web content.

Parameters

ParameterTypeRequiredDescription
urlstringYesURL to fetch
promptstringYesInstructions for processing

Example

{
"url": "https://target.com/robots.txt",
"prompt": "Extract all disallowed paths"
}

WebSearch

Performs web searches for information gathering.

Parameters

ParameterTypeRequiredDescription
querystringYesSearch query

CodeSearch

Searches code repositories and documentation.

Parameters

ParameterTypeRequiredDescription
querystringYesCode search query

Tool Permissions

Each tool requires specific permissions that can be configured:

PermissionToolsDefault
readReadask
editWrite, Editask
globGloballow
grepGrepallow
bashBashask
browserBrowserask
websearchWebSearch, CodeSearchask
webfetchWebFetchask
external_directoryAll file toolsask

Configuration

{
"permission": {
"bash": "ask",
"edit": "allow",
"read": "allow",
"glob": "allow",
"grep": "allow",
"browser": "ask"
}
}

Permission Modes

ModeDescription
askPrompt user for approval
allowAuto-approve without asking
denyBlock tool usage

Creating Custom Tools

Add custom tools by creating files in .cyberstrike/tools/:

.cyberstrike/tools/custom-scanner.ts
export default {
description: "Custom vulnerability scanner",
args: {
target: {
type: "string",
description: "Target URL to scan"
},
depth: {
type: "number",
description: "Scan depth",
default: 3
}
},
async execute(args, ctx) {
const { target, depth } = args
// Custom scanning logic
return `Scanned ${target} to depth ${depth}`
}
}

Tool Definition Schema

FieldTypeDescription
descriptionstringTool description for AI
argsobjectZod-compatible parameter schema
executefunctionAsync execution function

MCP Server Tools

Cyberstrike can load tools from MCP servers. Configure servers in cyberstrike.json:

{
"mcp": {
"kali-tools": {
"type": "local",
"command": ["npx", "@cyberstrike/mcp-kali"],
"enabled": true
}
}
}

MCP tools become available through the Tool Search system.

Tip

Use the tool_search tool to discover available MCP tools, then load_tools to activate them for use.