Commit 8148466

bryfry <bryon@fryer.io>
2025-09-17 11:13:58
docs
1 parent c91ae65
Changed files (2)
README.md
@@ -1,30 +1,114 @@
-# `mysh` 
+# mysh
 
-`mysh` (pronounced mɪʃh) is a cli interface to mythic c2 server
+`mysh` (pronounced mɪʃh) is a command-line interface for interacting with Mythic C2 servers.
 
-## project goals
+## Installation
 
-For each lab we're going to be instructed to click on the mythic user interface - yuck.
-This project is focused on creating a golang CLI application called `mysh` to accomplish the same tasks.
+### Building from Source
 
-## resources
+#### Using Makefile (Recommended)
+```bash
+# Build for current platform
+make build
 
-### the mythic server and `mythic.sh`
+# Build for all platforms
+make build-all
 
-This mythic system is setup in a test range with full athorized red team testing (it's a training course).
-We have a user-level access to this server.
+# Development build (faster)
+make dev
 
-`mythic.sh` provides an example curl interface to a test mythic api.
-The `TOKEN` provided in this file should be used for testing all developed functions.
+# Clean build artifacts
+make clean
 
-### `Mythic_Scripting`
+# Show all available targets
+make help
+```
 
-The `contrib/Mythic_Scripting` directory contains a python implementation of accessing and interacting with the mythic api.
-It is a clone of the `https://github.com/MythicMeta/Mythic_Scripting.git`.
+#### Manual Build
+```bash
+go build -o bin/mysh .
+```
 
-## labs
+## Configuration
 
-The `labs` directory will contain markdown files that will contain the steps that are desired to be accomplished/
-They will always be instructing the user to click and use the UI. 
-We will be translating these instructions into functions and cli subcommands.
+Both URL and authentication token are required.
 
+### Quick Setup
+```bash
+# Set via environment variables (recommended)
+export MYTHIC_API_URL="https://your-mythic-server:7443/graphql/"
+export MYTHIC_API_TOKEN="your-jwt-token-here"
+mysh callbacks
+```
+
+### Individual Configuration Options
+
+#### Mythic Server URL
+```bash
+# Set via command line flag
+mysh --url "https://your-mythic-server:7443/graphql/" callbacks
+
+# Set via environment variable
+export MYTHIC_API_URL="https://your-mythic-server:7443/graphql/"
+mysh callbacks
+```
+
+#### Authentication Token
+```bash
+# Set via command line flag
+mysh --token "your-jwt-token-here" callbacks
+
+# Set via environment variable
+export MYTHIC_API_TOKEN="your-jwt-token-here"
+mysh callbacks
+```
+
+#### API via SOCKS5 Proxy
+```bash
+# Use SOCKS5 proxy
+mysh --socks "127.0.0.1:9050" callbacks
+
+# Set via environment variable
+export MYTHIC_API_SOCKS="127.0.0.1:9050"
+mysh callbacks
+```
+
+## Usage
+
+### List Active Callbacks
+```bash
+mysh callbacks
+```
+
+### Execute Commands
+```bash
+# Get help for all commands from callback 1
+mysh exec 1 help
+
+# Get detailed help for a specific command
+mysh exec 1 help p
+
+# List processes
+mysh exec 1 ps
+
+# Set checkin frequency to 5 seconds
+mysh exec 1 sleep 5
+```
+
+### Interactive Session
+```bash
+mysh interact 1
+```
+
+## Project Structure
+
+### GraphQL Queries Synchronization
+The project maintains a 1:1 copy of GraphQL queries from the Python Mythic_Scripting library:
+- **Source:** `contrib/Mythic_Scripting/mythic/graphql_queries.py`
+- **Go Version:** `pkg/mythic/queries.go`
+- **Purpose:** Easier upstream synchronization and reduced raw strings in client code
+
+To sync with upstream updates:
+1. Check the Python file for changes
+2. Update the corresponding Go constants
+3. Test client functionality
TODO.md
@@ -1,7 +1,10 @@
 - ✅ grep should also look at the command execution strings too, not just output
 - ✅ Renamed project from go-mythic to mysh (pronounced mɪʃh)
-- forge equivalency with execute_assembly and inline_assembly
+- forge payloads - equivalency with execute_assembly and inline_assembly
 - task-list --all (same as --limit 0)
+- task-list without callback lists all tasks and shows callback column
+- task with --no-wait, doesn't wait for output
+- task [callback] arg make it accept lists, comma seperated, or ranges e.g. 1,2,3-5,10
 
 ## Code Quality Improvements