> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.krkn.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# krknc

> The Krkn Client (krknc) is the client used to communicate with the Krkn Service.

The Krkn Client can be used to interface with the Krkn Server

### Global Flags

| Flags             | Description                  |
| ----------------- | ---------------------------- |
| -d --debug        | Enable debug mode            |
| -n --hostname     | Tailscale hostname           |
| -k --insecure     | Skip TLS Verification        |
| -q --quic         | Use QUIC protocol            |
| -s --server       | Krkn Server Hostname/IP      |
| -t --tailscale    | Use Tailscale for connection |
| -w --webhook port | Port to use for webhook int  |

### Krkn Flags

| Command    | Description                                                 |
| ---------- | ----------------------------------------------------------- |
| completion | Generates the autocompletion script for the specified shell |
| config     | Manage the cache configuration                              |
| dumps      | Parse, and Analyze Dump Files                               |
| files      | Manage Rules, Wordlists and Mask FIles                      |
| hashes     | Manage or query cracked hashes                              |
| jobs       | Manage jobs                                                 |
| listen     | Start webhook listener                                      |
| logs       | View local or server (remote) logs                          |
| server     | Manage the Krkn Server                                      |
| service    | Manage the webhook listener service                         |
| toast      | Manage toast notifications                                  |
| users      | Manage users                                                |
| webhooks   | Manage webhooks                                             |

## First Time Setup

To utilize the Krkn Client (krknc) you will need to store the token received in your email in the environment variables. This can optionally be set by using the `krknc install` command.

<AccordionGroup>
  <Accordion title="Windows" icon="windows">
    In powershell

    `set KRKN_API_TOKEN=<token>`
  </Accordion>

  <Accordion title="Linux/Darwin" icon="linux">
    Dynamically determine the shell in use and append token entry

    ```bash theme={null}
    TOKEN="REDACTED"

    case "$SHELL" in
      */zsh)  PROFILE="$HOME/.zshrc" ;;
      */bash) PROFILE="$HOME/.bashrc" ;;
      */fish) PROFILE="$HOME/.config/fish/config.fish" ;;
      *) echo "Unsupported shell: $SHELL"; exit 1 ;;
    esac

    if echo "$PROFILE" | grep -q fish; then
      LINE="set -x KRKN_API_TOKEN \"$TOKEN\""
    else
      LINE="export KRKN_API_TOKEN=\"$TOKEN\""
    fi

    mkdir -p "$(dirname "$PROFILE")"

    grep -q 'KRKN_API_TOKEN' "$PROFILE" 2>/dev/null || echo "$LINE" >> "$PROFILE"

    echo "Added KRKN_API_TOKEN to $PROFILE"
    echo "Restart your shell or run: source $PROFILE"
    ```
  </Accordion>
</AccordionGroup>

### Add Configuration Settings

Set the Server, Tailscale (optional), hostname (tailscale hostname if on tailscale otherwise IP or resolvable hostname by Server) and Webhook Type/Port.

## Configuration

* **username**: Your username for authentication
* **server**: Server address (e.g., localhost:8443 or tailscale\_hostname-krkn:8443)
* **tailscale**: Use Tailscale (true/false)
* **quic**: Use QUIC protocol (true/false)
* **insecure**: Skip TLS verification (true/false)
* **debug**: Enable debug mode (true/false)
* **webhook-port**: Webhook listener port (number)
* **hostname**: Tailscale hostname (string)

Configs are used to set and persist settings across executions. The username is a required configuration along with the token however the token must be set in your environment variable.

### Config

| Sub-Command | Description                 |
| ----------- | --------------------------- |
| clear       | Clear all configurations    |
| get         | Get configuration value(s)  |
| set         | Set configuration value     |
| unset       | Unset a configuration value |

<AccordionGroup>
  <Accordion title="Get">
    <Note>
      Required Permissions: **N/A**
    </Note>

    The `get` command can be used to view your current settings.

    <img src="https://mintcdn.com/krakentechllc/aTR2Twle0BdwSMh_/config_get_c.png?fit=max&auto=format&n=aTR2Twle0BdwSMh_&q=85&s=4131a366693c13afae804b5fd45dd23b" alt="Config Get C" width="796" height="422" data-path="config_get_c.png" />
  </Accordion>

  <Accordion title="Set">
    <Note>
      Required Permissions: **N/A**
    </Note>

    The `set` command can be used to set a configuration value

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_34.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=d7a9a2103904e5dbabd6543b5c9f25f1" alt="Krkn 34" width="1006" height="134" data-path="images/Krkn-_34.png" />
  </Accordion>

  <Accordion title="Unset">
    <Note>
      Required Permissions: **N/A**
    </Note>

    The `unset` command can be used to remove a value from a single key

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_33.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=f91fc9c310730132d3f0a508dd382ff8" alt="Krkn 33" width="882" height="76" data-path="images/Krkn-_33.png" />
  </Accordion>

  <Accordion title="Clear">
    <Note>
      Required Permissions: **N/A**
    </Note>

    The `clear` command can be used to clear all entries in the configuration.
  </Accordion>
</AccordionGroup>

## Dumps

Dump can be used to facilitate the parsing and analyzing of dump files. This includes:

* Parsing hash information from NTDS.dit and the SYSTEM hive
* Parsing hash information from an LSASS Minidump
* Parsing hash information from a previous SecretsDump (Supports History and Status)

| Sub-Command | Description                                                                   |
| ----------- | ----------------------------------------------------------------------------- |
| analyze     | Perform an analysis of a companies password policy and current hash landscape |
| parse       | Parse hash information from given input(s)                                    |

<AccordionGroup>
  <Accordion title="Analyze">
    <Note>
      Required Privileges: **N/A**
    </Note>

    | Flag              | Description                                  | Default                      |
    | ----------------- | -------------------------------------------- | ---------------------------- |
    | --dedupe          | Deduplicate credentiasl across all sources   | True                         |
    | -f --format       | Output Format (xlsx, csv, json, yaml, xml)   | Auto-Detect from output file |
    | -g --groups       | Group membership file                        | Nil                          |
    | --include-history | Include password history entries in analysis | False                        |
    | --kerberoast      | Kerberoast hash file                         | Nil                          |
    | -l --lsass        | LSASS Parsed output file                     | Nil                          |
    | --ntds            | NTDS parsed output file                      | Nil                          |
    | -o --output       | Output file path (required)                  | Nil                          |
    | -p --policy       | Password Policy File                         | Nil                          |
    | --potfile         | Potfile in hash:password format              | Nil                          |
    | --secretsdump     | Secrets dump output file(s)                  | Nil                          |
    | --strict          | Fail on parse errors instead of skipping     | False                        |
    | --timeout         | Analysis timeout duration                    | 30m0s                        |
    | --workers         | Number of parallel workers for parsing       | 4                            |

    <img src="https://mintcdn.com/krakentechllc/5mLHednraSjZplr8/images/image-27.png?fit=max&auto=format&n=5mLHednraSjZplr8&q=85&s=72765aaab29590f2aefdfff5e92a77e8" alt="Image" width="2182" height="1268" data-path="images/image-27.png" />
  </Accordion>

  <Accordion title="Parse">
    <Note>
      Required Privileges: **N/A**
    </Note>

    A

    | Args     | Description                               |
    | -------- | ----------------------------------------- |
    | impacket | Parse an Impacket SecretsDump file        |
    | minidump | Parse a minidump file                     |
    | ntds     | Parse an NTDS.dit file with a SYSTEM file |

    <AccordionGroup>
      <Accordion title="impacket">
        | Flags            | Description               |
        | ---------------- | ------------------------- |
        | -p --file-prefix | Prefix for output file(s) |

        The `impacket` subcommand can be used to parse a *SecretsDump* file

        <img src="https://mintcdn.com/krakentechllc/5mLHednraSjZplr8/images/image-28.png?fit=max&auto=format&n=5mLHednraSjZplr8&q=85&s=e8c9fd4461edbd76583bdc0343516e0e" alt="Image" width="1592" height="1196" data-path="images/image-28.png" />
      </Accordion>

      <Accordion title="minidump">
        | Flags            | Description               |
        | ---------------- | ------------------------- |
        | -p --file-prefix | Prefix for output file(s) |

        The `minidump` subcommand can be used to parse hashes from an **lsass** minidump file.

        <img src="https://mintcdn.com/krakentechllc/5mLHednraSjZplr8/images/image-29.png?fit=max&auto=format&n=5mLHednraSjZplr8&q=85&s=e46e9e932f0b4f93b90aff8729cb5c0a" alt="Image" width="1646" height="180" data-path="images/image-29.png" />
      </Accordion>

      <Accordion title="NTDS">
        | Flags            | Description               |
        | ---------------- | ------------------------- |
        | -p --file-prefix | Prefix for output file(s) |

        The `ntds` subcommand can be used to parse hashes from an **NTDS.dit**  file and its corresponding **SYSTEM** file.

        <img src="https://mintcdn.com/krakentechllc/5mLHednraSjZplr8/images/image-32.png?fit=max&auto=format&n=5mLHednraSjZplr8&q=85&s=928a07011c0bc4147845d88180bf1f85" alt="Image" width="2318" height="1442" data-path="images/image-32.png" />
      </Accordion>
    </AccordionGroup>
  </Accordion>
</AccordionGroup>

## Logs

Logs can be queried to facilitate troubleshooting and debugging both remotely on the Krkn Server and locally.

| Sub-Command | Description            |
| ----------- | ---------------------- |
| local       | View local client logs |
| remote      | View Krkn Server logs  |

<AccordionGroup>
  <Accordion title="Remote">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Flag             | Description                                                               | Type   |
    | ---------------- | ------------------------------------------------------------------------- | ------ |
    | -E --end         | End date for logs (defaults to 'now')                                     | string |
    | -L --last        | Number of logs to show (default: 50)                                      | int    |
    | -T --no-truncate | Do not truncate log details                                               | bool   |
    | -V --severity    | Comma-delimited log severity to show (debug, info, warning, error, fatal) | string |
    | -S --start       | Start date for logs (e.g., '8 minutes ago', 'Jan 01, 2026')               | string |
    | -Q               | Query using a keyword value                                               | string |
  </Accordion>

  <Accordion title="Local">
    <Note>
      Required Privileges: **N/A**
    </Note>

    | Flag             | Description                                                               | Type   |
    | ---------------- | ------------------------------------------------------------------------- | ------ |
    | -E --end         | End date for logs (defaults to 'now')                                     | string |
    | -L --last        | Number of logs to show (default: 50)                                      | int    |
    | -T --no-truncate | Do not truncate log details                                               | bool   |
    | -V --severity    | Comma-delimited log severity to show (debug, info, warning, error, fatal) | string |
    | -S --start       | Start date for logs (e.g., '8 minutes ago', 'Jan 01, 2026')               | string |
    | -Q               | Query using a keyword value                                               | string |
  </Accordion>
</AccordionGroup>

<img src="https://mintcdn.com/krakentechllc/QDwzN0CwWrEbyuAJ/images/image-3.png?fit=max&auto=format&n=QDwzN0CwWrEbyuAJ&q=85&s=5a9eb84cee794e50d1a1a2ea2c0f1625" alt="Image" width="1890" height="668" data-path="images/image-3.png" />

## Users

| Sub-Command | Description                                            |
| ----------- | ------------------------------------------------------ |
| list        | List all users                                         |
| create      | Create a new user                                      |
| delete      | Delete a user                                          |
| set-role    | Set a users role                                       |
| reset-token | Reset the users token and send the ma new one in email |

Users are the primary driver behind the Krkn Server. To access the Krkn Server a user needs to have their Username saved to their config and their token saved as an environment variable.

Users fall into three different roles:

* **Admin** - Unfettered access to all gRPC commands
* **User** - Access to Job Creation, querying and status'
* **Reader** - Query access only

<AccordionGroup>
  <Accordion title="List">
    <Note>
      Required Privileges: **Admin**
    </Note>

    Users can be listed by using the `list` command

    <img src="https://mintcdn.com/krakentechllc/K9gR-1JOgk1PzalQ/user_list.png?fit=max&auto=format&n=K9gR-1JOgk1PzalQ&q=85&s=9a6b103eb7dbab511b1d951286ec4a67" alt="User List" width="1300" height="300" data-path="user_list.png" />

    <img src="https://mintcdn.com/krakentechllc/K9gR-1JOgk1PzalQ/user_list_2.png?fit=max&auto=format&n=K9gR-1JOgk1PzalQ&q=85&s=dd6d8d2d0ea6a78b912f26928272faba" alt="User List 2" width="2108" height="434" data-path="user_list_2.png" />
  </Accordion>

  <Accordion title="Create">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description   |
    | ---- | ------------- |
    | 1    | username      |
    | 2    | email address |

    A new user can be created by an **admin** user using the `user create` command. A token will be sent to their email address.

    <img src="https://mintcdn.com/krakentechllc/Zg_rIhHxTwvwuLD6/create_user.png?fit=max&auto=format&n=Zg_rIhHxTwvwuLD6&q=85&s=76a8091ea109a0fd4ca05f3d74dfc729" alt="Create User" width="2120" height="534" data-path="create_user.png" />

    <img src="https://mintcdn.com/krakentechllc/-BcO7aO5_u0jXOk8/validate_token.png?fit=max&auto=format&n=-BcO7aO5_u0jXOk8&q=85&s=ccb5a0946821d339c700991c2428d7dd" alt="Validate Token" width="1232" height="958" data-path="validate_token.png" />
  </Accordion>

  <Accordion title="Delete">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description |
    | ---- | ----------- |
    | 1    | username    |

    The `delete` subcommand can be used to delete a user from the Krkn Server.

    <img src="https://mintcdn.com/krakentechllc/-BcO7aO5_u0jXOk8/user_delete.png?fit=max&auto=format&n=-BcO7aO5_u0jXOk8&q=85&s=de770232d345e65b9cf4ca6484342089" alt="User Delete" width="2112" height="344" data-path="user_delete.png" />
  </Accordion>

  <Accordion title="Set-Role">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                |
    | ---- | -------------------------- |
    | 1    | Username                   |
    | 2    | Role (admin, user, reader) |
  </Accordion>

  <Accordion title="Reset-Token">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Decription |
    | ---- | ---------- |
    | 1    | Username   |
  </Accordion>
</AccordionGroup>

## Files

| Sub-Command | Description           |
| ----------- | --------------------- |
| masks       | Manage mask files     |
| rules       | Manage rule files     |
| wordlists   | manage wordlist files |

The files subcommand can be used to upload, download, delete, head, tail and perform checksums for Rules, Wordlists and Mask files.

### File Types

<AccordionGroup>
  <Accordion title="Masks">
    The masks are standard mask files supported by hashcat Masks are structured brute-force attack patterns

    ### Mask Tokens

    | Token | Meaning                |
    | ----- | ---------------------- |
    | `?l`  | lowercase letter (a-z) |
    | `?u`  | uppercase letter (A-Z) |
    | `?d`  | digit (0-9)            |
    | `?s`  | symbol                 |
    | `?a`  | all of the above       |

    ### Sample Masks

    | Pattern            | Meaning                          |
    | ------------------ | -------------------------------- |
    | `?u?l?l?l?l?d?d`   | Capital + 4 lowercase + 2 digits |
    | `?l?l?l?l?l?l?d?d` | 6 letters + 2 digits             |
    | `Summer?d?d?d!`    | “Summer###!”                     |
    | `?u?l?l?l?l?l?d!`  | Capitalized word + digit + !     |

    ## Example Command

    `krknc job create hashes.txt -T 1000 -A 3 -M `?u?l?l?l?l?l?d?d\`
  </Accordion>

  <Accordion title="Rules">
    The rules are standard rule files supported by hashcat Rules are transformations typically applied to wordlists

    ### Example Rules

    c       # capitalize $1      # append 1
            $!      # append !

    *applied to: summer*

    * Summer1!

    ### Example Command

    `krknc job create hashes.txt -T 1000 -A 0 -W wordlist.txt -R best64.rule`
  </Accordion>

  <Accordion title="Wordlists">
    The wordlists are wordlist files for use by hashcat
  </Accordion>
</AccordionGroup>

### Sub-Commands

<AccordionGroup>
  <Accordion title="Upload">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                                 |
    | ---- | ------------------------------------------- |
    | 1    | the local file to upload to the Krkn Server |

    The `upload` subcommand can be used to upload a file from your host to the Krkn Server.

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_44.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=a0f9cb9583033210b141ce7f1841ed72" alt="Krkn 44" width="1684" height="518" data-path="images/Krkn-_44.png" />
  </Accordion>

  <Accordion title="Download">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                                                                              |
    | ---- | ---------------------------------------------------------------------------------------- |
    | 1    | The url of the downloadable file. For github, ensure you are using the github *raw* file |
    | 2    | The name to save the file as on the Krkn Server                                          |

    The `download` subcommand can be used to prompt the Krkn Server to download a file from a given url.

    <img src="https://mintcdn.com/krakentechllc/3Pp70L3IOotR2kRa/images/Krkn-_53.png?fit=max&auto=format&n=3Pp70L3IOotR2kRa&q=85&s=f20c18ef53fcac2a00a93bb90d29d222" alt="Krkn 53" width="1710" height="254" data-path="images/Krkn-_53.png" />
  </Accordion>

  <Accordion title="List">
    <Note>
      Required Privileges: **Admin, User**
    </Note>

    The `list` subcommand can be used to list files of the specified type on the Krkn Server.

    <img src="https://mintcdn.com/krakentechllc/3Pp70L3IOotR2kRa/images/Krkn-_52.png?fit=max&auto=format&n=3Pp70L3IOotR2kRa&q=85&s=8127cab664c2158d948ddfff25de4205" alt="Krkn 52" width="1024" height="474" data-path="images/Krkn-_52.png" />
  </Accordion>

  <Accordion title="Head">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                       |
    | ---- | --------------------------------- |
    | 1    | The name of the file to read from |
    | 2    | The number of lines to read       |

    The `head` subcommand can be used to read the first N lines in the specified file.

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_49.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=4435149028c9e41b3847c6c449bb0c45" alt="Krkn 49" width="1358" height="1128" data-path="images/Krkn-_49.png" />
  </Accordion>

  <Accordion title="Tail">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                       |
    | ---- | --------------------------------- |
    | 1    | The name of the file to read from |
    | 2    | The number of lines to read       |

    The `tail` subcommand can be used to read the last N lines in the specified file.

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_47.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=f979a7ccd9a1c11d53de00b3fa6f6b56" alt="Krkn 49" width="1108" height="768" data-path="images/Krkn-_47.png" />
  </Accordion>

  <Accordion title="Sum">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                      |
    | ---- | -------------------------------- |
    | 1    | The name of the file to checksum |

    The `sum` subcommand can be used to determine if the Sha256 sum of the downloaded or uploaded file matches what is expected.

    <img src="https://mintcdn.com/krakentechllc/3Pp70L3IOotR2kRa/images/Krkn-_8.png?fit=max&auto=format&n=3Pp70L3IOotR2kRa&q=85&s=21d5176496614b397fcc6dbe5dfcb8b4" alt="Krkn 8" width="2150" height="258" data-path="images/Krkn-_8.png" />
  </Accordion>

  <Accordion title="Delete">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                    |
    | ---- | ------------------------------ |
    | 1    | The name of the file to delete |

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_43.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=42b6b9b160f74c56ae67912ac64adb75" alt="Krkn 50" width="1108" height="380" data-path="images/Krkn-_43.png" />

    The `delete` subcommand can be used to delete the specified file from the Krkn Server.
  </Accordion>
</AccordionGroup>

## Hashes

The `hashes` subcommand can be used to query or upload hashes to the Krkn Server.

| Sub-Commands | Description                                           |
| ------------ | ----------------------------------------------------- |
| query        | Query the provided hashes                             |
| recount      | Perform a recount of all hash statistics              |
| stats        | Show hash statistics                                  |
| upload       | Upload cracked hashes from file or stdin              |
| id           | Attempt to identify the hashcat mode for a given hash |
| defang       | Remove client PII from a given hash                   |

### Sub-Commands

<AccordionGroup>
  <Accordion title="Query">
    <Note>
      Required Privileges: **Admin, User, Reader**
    </Note>

    | Flags | Description                              |
    | ----- | ---------------------------------------- |
    | -T    | The hashcat mode of the provided hashes  |
    | -H    | Provide a comma delimited list of hashes |
    | -F    | Provide a file of hashes                 |
    | -O    | Output file for results                  |
    | -D    | Dispaly results to stdout                |

    The `query` subcommand can be used to query the Krkn Server for previously cracked hashes

    <img src="https://mintcdn.com/krakentechllc/3Pp70L3IOotR2kRa/images/Krkn-_71.png?fit=max&auto=format&n=3Pp70L3IOotR2kRa&q=85&s=362694830a3ce8f82880f2a7aa93217d" alt="Krkn 71" width="1686" height="226" data-path="images/Krkn-_71.png" />
  </Accordion>

  <Accordion title="Recount">
    <Note>
      Required Privileges: ***Admin***
    </Note>

    The `recount` subcommand can be used to order the Krkn Server to perform a hash recount. This will force the Krkn Database to perform a recount of all cracked hashes and adjust its counters.

    <img src="https://mintcdn.com/krakentechllc/Bst3yaPju7WinwdC/images/image-25.png?fit=max&auto=format&n=Bst3yaPju7WinwdC&q=85&s=99ec6c25eade5bbd39551787f58787a2" alt="Image" width="1996" height="260" data-path="images/image-25.png" />
  </Accordion>

  <Accordion title="Stats">
    <Note>
      Required Privileges: \*\*Admin\*\*
    </Note>

    | Args | Description                         |
    | ---- | ----------------------------------- |
    | mode | The hashcat mode to query stats for |

    The `stats` subcommand can be used to query the hash stats from the Krkn Server. The hashcat mode is optional. If not supplied the entire hash count will be returned.

    <img src="https://mintcdn.com/krakentechllc/Bst3yaPju7WinwdC/images/image-23.png?fit=max&auto=format&n=Bst3yaPju7WinwdC&q=85&s=72afaf46facfd9ab41f14e9256715f49" alt="Image" width="1272" height="328" data-path="images/image-23.png" />

    <img src="https://mintcdn.com/krakentechllc/Bst3yaPju7WinwdC/images/image-24.png?fit=max&auto=format&n=Bst3yaPju7WinwdC&q=85&s=b0133efe1086e9a14117e2e93145a726" alt="Image" width="1240" height="326" data-path="images/image-24.png" />
  </Accordion>

  <Accordion title="Upload">
    <Note>
      Required Privileges: **Admin**
    </Note>

    | Args | Description                                    |
    | ---- | ---------------------------------------------- |
    | 1    | Hashcat mode                                   |
    | 2    | The local file to upload containing the hashes |

    The `upload` subcommand can be used to upload previously cracked hashes to the Krkn Server. These hashes are then added to the database.

    <img src="https://mintcdn.com/krakentechllc/3Pp70L3IOotR2kRa/images/Krkn-_72.png?fit=max&auto=format&n=3Pp70L3IOotR2kRa&q=85&s=a5a748809a933f7f74fe93b879b07db4" alt="Krkn 72" width="1716" height="182" data-path="images/Krkn-_72.png" />
  </Accordion>

  <Accordion title="Id">
    <Note>
      Required Privileges: **N/A**
    </Note>

    | Args | Description          |
    | ---- | -------------------- |
    | hash | The hash to identify |

    The `id` subcommand to identify potential hashcat types for a given hash.

    <img src="https://mintcdn.com/krakentechllc/eKEVKlHx9pH0MF17/images/image-22.png?fit=max&auto=format&n=eKEVKlHx9pH0MF17&q=85&s=0d8f171a26d5a0424220a7e3995b4d5b" alt="Image" width="2424" height="1272" data-path="images/image-22.png" />
  </Accordion>

  <Accordion title="Defang">
    <Note>
      Required Privileges: **N/A**
    </Note>

    | Args | Description                  |
    | ---- | ---------------------------- |
    | hash | The hash to defang           |
    | mode | The hashcat mode of the hash |

    The `defang` subcommand can be used to remove client data from a given hash including:

    * **Domain**
    * **Username**

          <img src="https://mintcdn.com/krakentechllc/hKnpLJcp79Q-JnFY/images/image-26.png?fit=max&auto=format&n=hKnpLJcp79Q-JnFY&q=85&s=60e466051409e4f6fd415a9759bbe8f8" alt="Image" width="1684" height="170" data-path="images/image-26.png" />
  </Accordion>
</AccordionGroup>

## Jobs

| Sub-Command | Description          |
| ----------- | -------------------- |
| create      | Create a new job     |
| delete      | Delete a job         |
| download    | Download job results |
| get         | Get a jobs details   |
| list        | List all jobs        |
| cancel      | Cancel a running job |

The `jobs`  subcommand encompasses the distributed KCat hash cracking system incorporated into the Krkn Service.

<AccordionGroup>
  <Accordion title="Create">
    <Note>
      Required Privileges: **User, Admin**
    </Note>

    ### Args

    | Args | Description                       |
    | ---- | --------------------------------- |
    | 1    | The local hashes file for the job |
    |      |                                   |

    ### Flags

    | Flag             | Description                                                                      |
    | ---------------- | -------------------------------------------------------------------------------- |
    | -T --hashtype    | The hashcat mode to use for the job                                              |
    | -W --wordlist    | The wordlist to use for the job                                                  |
    | -M --masks       | Name of masks file on server (required for modes 3, 6, 7)                        |
    | -R --rules       | Name of rules file on server                                                     |
    | -A --attack-mode | The attack mode to use for the job                                               |
    | -D --description | Description of the job                                                           |
    | --full-suite     | Run full attack suite (ignores attack-mode, runs multiple strategies)            |
    | --increment      | Enable mask increment mode (modes 3, 6, 7 only)                                  |
    | --increment-min  | Stop mask incrementing at this length                                            |
    | --increment-max  | Start mask incrementing at this length                                           |
    | --append         | Mask to append to each candidate                                                 |
    | --prepend        | Mask to prepend to each candidate                                                |
    | -L               | Listen after creation using the host, port and webhook type stored in the config |

    ### Attack Modes

    *   0 - Straight/Dictionary: Uses wordlist (-w required)
    *   1 - Combination: Combines words from wordlist (-w required)
    *   3 - Brute-force/Mask: Uses mask patterns (-m required)
    *   6 - Hybrid Wordlist+Mask: Appends mask to wordlist words (-w and -m required)
    *   7 - Hybrid Mask+Wordlist: Prepends mask to wordlist words (-w and -m required)

    ### Examples

    * Dictionary attack with rules
      * `krknc job create hashes.txt -T 1000 -A 0 -W rockyou -R best64`
    * Mask attack with increment
      * `krknc job create hashes.txt -T 1000 -A 3 -M "?a?a?a?a?a?a" --increment --increment-min 4 --increment-max 8`
    * Hybrid attack
      * `krknc job create hashes.txt -T 1000 -A 6 -W rockyou -M "?d?d?d"`
    * Full suite attack (runs multiple attack strategies)
      * `krknc job create hashes.txt -T 1000 --full-suite`

    The `create` subcommand can be used to create a new job and place it into the queue on the Krkn Server.

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_16.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=f0cc7b46c3ca49a31fd0896dc348e827" alt="Krkn 16" width="2138" height="294" data-path="images/Krkn-_16.png" />
  </Accordion>

  <Accordion title="Delete">
    <Note>
      Required Privileges: **Job Owner, Admin**
    </Note>

    | Args | Description                 |
    | ---- | --------------------------- |
    | 1    | The id of the job to delete |

    The `delete` subcommand can be used to delete an enqueued job.

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_20.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=2518e45095512824aa01d24e9be486f3" alt="Krkn 20" width="2142" height="268" data-path="images/Krkn-_20.png" />
  </Accordion>

  <Accordion title="Download">
    <Note>
      Required Privileges: **Job Owner, Admin**
    </Note>

    | Args | Description                   |
    | ---- | ----------------------------- |
    | 1    | The ID of the job to download |
    | 2    | The name of the output file   |

    The `download` subcommand can be used to retrieve all cracked hashes from a completed job.

    <img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_18.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=bc39a7680dd26b25546c1519c8e76a3c" alt="Krkn 18" width="2172" height="1466" data-path="images/Krkn-_18.png" />
  </Accordion>

  <Accordion title="Get">
    <Note>
      Required Privileges: **Job Owner, Admin**
    </Note>

    | Args | Description                   |
    | ---- | ----------------------------- |
    | 1    | The id of the job to retrieve |

    The `get` subcommand can be used to get the status and configuration of a specific job by its `id` .

    The table always includes the persisted fields:

    | Field         | Source                                                      |
    | ------------- | ----------------------------------------------------------- |
    | `ID`          | Job ID                                                      |
    | `NAME`        | Job name                                                    |
    | `DESCRIPTION` | Job description                                             |
    | `STATUS`      | Persisted KCAT status (PENDING / RUNNING / COMPLETED / ...) |
    | `CREATED`     | Created at                                                  |
    | `UPDATED`     | Updated at                                                  |
    | `RESULTS`     | Results summary                                             |
    | `WORKER`      | Last Tentacle instrument that worked the batch              |
    | `CRACKED`     | Persisted cracked count                                     |
    | `REMAINING`   | Persisted remaining count                                   |

    ### Live Hashcat Fields

    When a Tentacle worker is currently running the batch for this job, the table also appends live hashcat snapshot fields forwarded by the worker every 5 seconds (see [krkns → Live Job Status](/tools/Krkn/krkns#live-job-status)). These rows are absent for jobs that haven't started yet or have already finished:

    | Field                 | hashcat source field (`kcat.Status`)              |
    | --------------------- | ------------------------------------------------- |
    | `LIVE PROGRESS`       | `Progress` — `X/Y (Z%)`                           |
    | `LIVE RECOVERED`      | `Recovered` — `X/Y (Z%) Digests, X/Y (Z%) Salts`  |
    | `LIVE RECOVERED #`    | Numeric cracked count parsed from `Recovered`     |
    | `LIVE TIME STARTED`   | `TimeStarted` (absolute)                          |
    | `LIVE TIME ESTIMATED` | `TimeEstimated` (absolute)                        |
    | `LIVE TIME REMAINING` | `TimeEstimatedRelative` (e.g. "3 hours, 12 mins") |
    | `LIVE SPEED`          | `TotalSpeed` — aggregate H/s across all devices   |
    | `LIVE SESSION`        | hashcat session name                              |
    | `LIVE SNAPSHOT AT`    | RFC3339 timestamp the snapshot was captured       |

    <Tip>
      Because the snapshot is cached in-memory on krkns, the overhead of `get` remains a single RPC — no extra round-trips to the worker. Running `krknc job get <id>` repeatedly against a job in progress will show the progress advance every few seconds.
    </Tip>

    <img src="https://mintcdn.com/krakentechllc/K9gR-1JOgk1PzalQ/job_get.png?fit=max&auto=format&n=K9gR-1JOgk1PzalQ&q=85&s=9ee2caff341329ff78f10704380dc54c" alt="Job Get" width="2148" height="610" data-path="job_get.png" />
  </Accordion>

  <Accordion title="List">
    <Note>
      Required Privileges: **Job Owner, Admin**
    </Note>

    The `list` subcommand can be used to list jobs and their status'.

    <Info>
      For any job in the list that is currently being cracked by a Tentacle worker, the response includes the same live hashcat snapshot fields as `job get` (progress, recovered count, time started, time remaining, total speed, ...). The snapshot comes from the krkns in-memory cache so listing all jobs still takes one round-trip regardless of how many are running.
    </Info>

    <img src="https://mintcdn.com/krakentechllc/K9gR-1JOgk1PzalQ/job_list.png?fit=max&auto=format&n=K9gR-1JOgk1PzalQ&q=85&s=edf89247903420bf169370ca087d7f04" alt="Job List" width="2226" height="396" data-path="job_list.png" />
  </Accordion>

  <Accordion title="Cancel">
    | Args   | Description               |
    | ------ | ------------------------- |
    | job-id | The id of the running job |

    The `cancel` subcommand can be used to cancel a running job.
  </Accordion>
</AccordionGroup>

## Webhooks

Krkn Clients can create webhooks to manage jobs and updates. For the client to register for Webhooks when using tailscale, a new node will need to be added to the Tailscale network.

<img src="https://mintcdn.com/krakentechllc/7rBqbJkVKeqSKZ8d/krkn_webhook_rt.gif?s=cff51b811c83863e2580cbbdf2be1a79" alt="Krkn Webhook Rt" width="1080" height="720" data-path="krkn_webhook_rt.gif" />

### Webhook Types

<Tip>
  Webhooks can be configured to alert in one of three ways
</Tip>

<AccordionGroup>
  <Accordion title="Real-Time">
    All cracked passwords will be sent back to your host
  </Accordion>

  <Accordion title="Completion">
    When the job is completed, a notification will be sent back to your host
  </Accordion>

  <Accordion title="All">
    Both real-time and completion updates will be sent back to your host
  </Accordion>
</AccordionGroup>

### Sub-Commands

<AccordionGroup>
  <Accordion title="Listen">
    | -N, --notifications | enable OS notifications                    |
    | ------------------- | ------------------------------------------ |
    | -p, --port          | port to listen on (default 9090)           |
    | -S, --save-toasts   | save toast messages to file (default true) |
    | --system            | run in system service mode                 |

    The `listen` subcommand can be used to register and listen in realtime for job updates.
  </Accordion>

  <Accordion title="Service">
    | Sub-Command | Description                                    |
    | ----------- | ---------------------------------------------- |
    | install     | Install the webhook listener service           |
    | uninstall   | Uninstall the webhook listener service         |
    | status      | Get the status of the webhook listener service |

    The `service` subcommand can be used to register/deregister a webhook service for listening on the host system.

    <AccordionGroup>
      <Accordion title="Install">
        | Flag                | Description                            |
        | :------------------ | :------------------------------------- |
        | -N, --notifications | Enable OS notifications (default true) |
        | -p, --port          | Port to listen on (default 9090)       |

        The `install` subcommand can be used to install the webhook service on the host system.
      </Accordion>

      <Accordion title="Uninstall">
        The `uninstall` subcommand can be used to uninstall the webhook service on the host system.
      </Accordion>

      <Accordion title="Status">
        The `status` subcommand can be used to query the webhook service on the host system.
      </Accordion>
    </AccordionGroup>
  </Accordion>
</AccordionGroup>

## Toast

| Sub-Command | Description                     |
| ----------- | ------------------------------- |
| list        | Show toast messages             |
| read        | Mark all toast messages as read |
| clear       | Remove all toast messages       |

Webhooks can be configured to use OS Specific Toast messages, which appear on a graphical desktop interface for user alerts. Toasts can also be queried using the toast subcommand if they are missed.

<Tip>
  > To utilize the toasts messages, they must be enabled in the config
  >
  > `krknc config set toasts true`
</Tip>

<AccordionGroup>
  <Accordion title="List">
    The `list` subcommand can be used to display all toast messages received via webhooks.

    | Flag        | Description                     |
    | ----------- | ------------------------------- |
    | -u --unread | Only list unread toast messages |

    <img src="https://mintcdn.com/krakentechllc/S0AI8ayqXUpLFbz8/toast_list.png?fit=max&auto=format&n=S0AI8ayqXUpLFbz8&q=85&s=7934c0c7fd42c7daaa865e08efa867f0" alt="Toast List" width="2292" height="1372" data-path="toast_list.png" />
  </Accordion>

  <Accordion title="Read">
    The `read` subcommand can be used to mark all toast messages as read.

    <img src="https://mintcdn.com/krakentechllc/S0AI8ayqXUpLFbz8/toast_read.png?fit=max&auto=format&n=S0AI8ayqXUpLFbz8&q=85&s=de5ccd0580305bd8de6e00aefcb15cea" alt="Toast Read" width="998" height="120" data-path="toast_read.png" />
  </Accordion>

  <Accordion title="Clear">
    | Flag      | Description                    |
    | --------- | ------------------------------ |
    | -r --read | Only clear read toast messages |

    The `clear` subcommand can be used to clear all toast messages from the cache.

    <img src="https://mintcdn.com/krakentechllc/BGy0d8_mH7Fswz1J/toast_clear.png?fit=max&auto=format&n=BGy0d8_mH7Fswz1J&q=85&s=26d7d949f8904bea04df33cf754c8172" alt="Toast Clear" width="1042" height="468" data-path="toast_clear.png" />
  </Accordion>
</AccordionGroup>

<img src="https://mintcdn.com/krakentechllc/S0AI8ayqXUpLFbz8/toast_notification.png?fit=max&auto=format&n=S0AI8ayqXUpLFbz8&q=85&s=ad67ad2327833c8d74edd9864f0f81a8" alt="Toast Notification" width="3014" height="1898" data-path="toast_notification.png" />

## Server

The `server` subcommand can be used to query active workers for the conductor

<AccordionGroup>
  <Accordion title="Workers">
    The `workers` subcommand can be used to query the Krkn Server for worker information

    <AccordionGroup>
      <Accordion title="List">
        | Flag     | Description      |
        | -------- | ---------------- |
        | -a --all | Show all columns |

        The `list` subcommand can be used to query tentacle workers and their status.

        <img src="https://mintcdn.com/krakentechllc/3Pp70L3IOotR2kRa/images/Krkn-_7.png?fit=max&auto=format&n=3Pp70L3IOotR2kRa&q=85&s=37edf85003a5ca120ec2622d2798e20a" alt="Krkn 7" width="2126" height="394" data-path="images/Krkn-_7.png" />
      </Accordion>
    </AccordionGroup>
  </Accordion>

  <Accordion title="Sender">
    The `sender` subcommand can be used to query the Krkn Server to manage the email sender.

    * Confirm a new email sender
    * Get the current email sender
    * Set a new email sender
    * Send a test email

    <AccordionGroup>
      <Accordion title="Get">
        The `get` subcommand can be used to query the active email sender.

        <img src="https://mintcdn.com/krakentechllc/0uQKIAKLoVLLNfgC/images/image-10.png?fit=max&auto=format&n=0uQKIAKLoVLLNfgC&q=85&s=4ebdaae8de06e5bf5dfb7747d240c814" alt="Image" width="1426" height="360" data-path="images/image-10.png" />
      </Accordion>

      <Accordion title="List">
        The `list` subcommand lists all available email senders.

        <img src="https://mintcdn.com/krakentechllc/kGy1Y0f9Yuuo8_hu/images/image-15.png?fit=max&auto=format&n=kGy1Y0f9Yuuo8_hu&q=85&s=5fbae16fb6c7479cf601e420ebd803fe" alt="Image" width="1568" height="354" data-path="images/image-15.png" />
      </Accordion>

      <Accordion title="Activate">
        | Args       | Description                   |
        | ---------- | ----------------------------- |
        | identifier | The ID or Email of the sender |

        The `activate` subcommand activates an available email sender.

        <img src="https://mintcdn.com/krakentechllc/kGy1Y0f9Yuuo8_hu/images/image-17.png?fit=max&auto=format&n=kGy1Y0f9Yuuo8_hu&q=85&s=b63d4ced5a04f38a46895327076ef737" alt="Image" width="1128" height="176" data-path="images/image-17.png" />
      </Accordion>

      <Accordion title="Test">
        | Args  | Description                     |
        | ----- | ------------------------------- |
        | email | The recipient of the test email |

        The `test` subcommand can be used to send a test email from the active email sender.

        <img src="https://mintcdn.com/krakentechllc/0uQKIAKLoVLLNfgC/images/image-9.png?fit=max&auto=format&n=0uQKIAKLoVLLNfgC&q=85&s=6a7c5b996fd1fdf8f2d617dd210e3c7a" alt="Image" width="1186" height="226" data-path="images/image-9.png" />
      </Accordion>

      <Accordion title="Set">
        The `set` subcommand can be used to set a new email sender.

        <img src="https://mintcdn.com/krakentechllc/0uQKIAKLoVLLNfgC/images/image-11.png?fit=max&auto=format&n=0uQKIAKLoVLLNfgC&q=85&s=0bd983bb30f671b587d97fb1e7a8244b" alt="Image" width="1592" height="466" data-path="images/image-11.png" />

        <img src="https://mintcdn.com/krakentechllc/0uQKIAKLoVLLNfgC/images/image-12.png?fit=max&auto=format&n=0uQKIAKLoVLLNfgC&q=85&s=9bf43745080220d1bb939a68ec74d8f4" alt="Image" width="2412" height="1226" data-path="images/image-12.png" />

        <AccordionGroup>
          <Accordion title="Microsoft Outlook / Office 365">
            #### Args

            | Args  | Description                     |
            | ----- | ------------------------------- |
            | email | The recipient of the test email |

            #### Flags

            | Flags          | Description                        |
            | -------------- | ---------------------------------- |
            | -p --password. | App password for the email account |
            | -r --recipient | The recipient of the test email    |

            The `outlook` subcommand can be used to create a new Outlook email sender.

            To obtain an app password, you can use the following [link](https://mysignins.microsoft.com/security-info).
          </Accordion>

          <Accordion title="Gmail/Google Workspace">
            #### Args

            | Args  | Description                     |
            | ----- | ------------------------------- |
            | email | The recipient of the test email |

            #### Flags

            | Flags          | Description                        |
            | -------------- | ---------------------------------- |
            | -p --password  | App password for the email account |
            | -r --recipient | The recipient of the test email    |

            The `gmail` subcommand can be used to create a new Outlook email sender.

            To obtain an app password, you can use the following [link](https://myaccount.google.com/apppasswords).
          </Accordion>

          <Accordion title="Mailgun">
            #### Args

            | Args       | Description              |
            | ---------- | ------------------------ |
            | from-email | The email to send *from* |

            #### Flags

            | Flags          | Description                         |
            | -------------- | ----------------------------------- |
            | -r --recipient | The recipient of the test email     |
            | --base-url     | Mailgun base URL (for EU customers) |
            | --domain       | The Mailgun domain                  |
            | --api-private  | The Mailgun private API Key         |

            The `mailgun` subcommand can be used to create a new Mailgun email sender.
          </Accordion>

          <Accordion title="Sendgrid">
            #### Args

            | Args       | Description              |
            | ---------- | ------------------------ |
            | from-email | The email to send *from* |

            #### Flags

            | Flags          | Description                     |
            | -------------- | ------------------------------- |
            | -r --recipient | The recipient of the test email |
            | --api-key      | The Sendgrid API Key            |

            The `mailgun` subcommand can be used to create a new Mailgun email sender.
          </Accordion>

          <Accordion title="Standard SMTP">
            #### Args

            | Args       | Description              |
            | ---------- | ------------------------ |
            | from-email | The email to send *from* |

            #### Flags

            | Flags          | Description                     |
            | -------------- | ------------------------------- |
            | -r --recipient | The recipient of the test email |
            | --bounce       | Bounce email address            |
            | --hostname     | The SMTP Server hostname        |
            | --password     | The SMTP Server password        |
            | --port         | The SMTP Server port            |
            | --tls          | Use TLS                         |

            The `smtp` subcommand can be used to create a new standard SMTP email sender.
          </Accordion>
        </AccordionGroup>
      </Accordion>

      <Accordion title="Confirm">
        | Args  | Description                                               |
        | ----- | --------------------------------------------------------- |
        | token | The token received in the email sent from the set command |

        The `confirm`subcommand can be used to confirm the new email sender.

        <img src="https://mintcdn.com/krakentechllc/0uQKIAKLoVLLNfgC/images/image-14.png?fit=max&auto=format&n=0uQKIAKLoVLLNfgC&q=85&s=8cea7a42d9fce376b06342da14656741" alt="Image" width="1494" height="222" data-path="images/image-14.png" />
      </Accordion>

      <Accordion title="Delete">
        | Args       | Description                   |
        | ---------- | ----------------------------- |
        | identifier | The ID or Email of the sender |

        The `delete` subcommand deletes an email sender by id

        <img src="https://mintcdn.com/krakentechllc/M9gpR4ikSJoGYb71/images/image-20.png?fit=max&auto=format&n=M9gpR4ikSJoGYb71&q=85&s=3bcdef4bc03eb5d92740581b2b287a63" alt="Image" width="1146" height="190" data-path="images/image-20.png" />

        <Note>
          You cannot delete an active sender, you must first activate an inactive one
        </Note>

        <img src="https://mintcdn.com/krakentechllc/M9gpR4ikSJoGYb71/images/image-19.png?fit=max&auto=format&n=M9gpR4ikSJoGYb71&q=85&s=d7235e5445c0f4799dd35843c79d95da" alt="Image" width="1658" height="256" data-path="images/image-19.png" />
      </Accordion>
    </AccordionGroup>
  </Accordion>
</AccordionGroup>

# Tailscale

When connecting over Tailscale, you must supply the Tailscale `<hostname>-krkn` of the destination server. You may supply just the hostname and the -krkn will be appended to the end.

The client will also have to be registered separately on Tailscale as its own node. The client will use the existing Tailscale connection and will host the hostname value supplied in the config otherwise the systems default hostname will be used.

# Auto-Completion

| Sub-Command | Description                                       |
| ----------- | ------------------------------------------------- |
| bash        | Generate the autocompletion script for bash       |
| fish        | Generate the autocompletion script for fish       |
| powershell  | Generate the autocompletion script for powershell |
| zsh         | Generate the autcompletion script for zsh         |

Autocompletion scripts can be added to your profile to allow tab completion and other features of the Krkn Client application.

### Bash Sample

<img src="https://mintcdn.com/krakentechllc/AEChm_hbncj06v_j/images/Krkn-_35.png?fit=max&auto=format&n=AEChm_hbncj06v_j&q=85&s=94cac6af820de896d38f3958486d1c64" alt="Krkn 35" width="1440" height="968" data-path="images/Krkn-_35.png" />
