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

# Hack me

> Have one public host penetration tested: accept the terms, pay, prove control with a DNS TXT record, get validated findings with evidence and a fix

Hack me is an automated black-box penetration test of one public host you control. MindFort, Morph's security testing partner, runs a swarm of agents against it. They test authentication, access control, injection and business logic, then report the findings they validated against the live host: where each one is, the evidence, and how to fix it.

```bash theme={null}
export MORPH_API_KEY="YOUR_API_KEY"
morph hackme start app.example.com
morph hackme watch ENGAGEMENT_ID
morph hackme report ENGAGEMENT_ID
```

`start` shows the price and the terms, then prints a Stripe Checkout URL. `watch` prints the DNS TXT record to publish once you have paid, follows the assessment, and exits when the report is ready. `report` prints the findings.

Everything on the dashboard's [Hack me](https://www.morphllm.com/dashboard/hack-me) page is also a `morph hackme` command and an API route.

## What you buy

| | |
| :- | :- |
| **Target** | One exact public hostname, such as `app.example.com`, tested over HTTPS on port 443. No wildcards, IP addresses or private names (`localhost`, `.internal`, `.local`, `.corp` and the like). Every A and AAAA record of the host must be a public address. |
| **Price** | \$500 plus tax per assessment, paid by card in Stripe Checkout. Stripe adds sales tax from your billing address. A promotion code and a tax ID can be entered at checkout. |
| **Proof of control** | After payment you publish one DNS TXT record that MindFort issues. Testing starts only once it is found. |
| **Duration** | Several hours once testing starts. |
| **Result** | Validated findings, highest severity first, each with its endpoint, evidence and fix. |
| **Restarts** | A run that fails can be run again on the same payment at no charge: 2 restarts, within 7 days of payment. |
| **Owner** | A personal API key orders for your personal account; an organization key for the organization. Any key of the account can read its engagements. Starting, paying, verifying, cancelling and restarting with an organization key need a key created by an organization admin. |
| **One at a time** | An account has one engagement in progress at a time. Finish or cancel it before starting another. |

> [!WARNING]
>
> The test sends real traffic to the host and can cause errors, alerts, rate limiting or downtime on it. Name only a host you own, or one whose owner has authorized you to have it tested. The agents also browse the public internet to research the target.

## 1. Accept the terms

The terms are short and name your host. They are versioned: the version you accept is recorded on the engagement with the time and who accepted it.

> [tab] CLI
>
> Install the [Morph CLI](https://docs.morphllm.com/cli.md), then:
>
> ```bash theme={null}
> morph hackme start app.example.com
> ```
>
> The CLI prints the host, the price and the terms, then asks you to accept them. `-y` (`--yes`) accepts without asking. It then prints the Stripe Checkout URL and opens it in your browser. Nothing is charged from the terminal.

> [tab] Dashboard
>
> Open [Hack me](https://www.morphllm.com/dashboard/hack-me) in the account or organization that will own the test. Enter the hostname, read the terms, check the box and select **Continue**.

> [tab] API
>
> Read the price and the terms for the host. Show `terms` to the person who accepts them.
>
> ```bash theme={null}
> curl "https://api.morphllm.com/api/v1/hack-me/terms?hostname=app.example.com" \
>   -H "Authorization: Bearer $MORPH_API_KEY"
> ```
>
> ```json theme={null}
> {
>   "priceCents": 50000,
>   "currency": "usd",
>   "agreementVersion": "AGREEMENT_VERSION",
>   "terms": [
>     "MindFort, Morph's security testing partner, will run an automated penetration test against app.example.com for Morph. ...",
>     "..."
>   ],
>   "checkoutOpen": true
> }
> ```
>
> Then start the engagement with the version you showed. `acceptedTerms` must be `true`.
>
> ```bash theme={null}
> curl https://api.morphllm.com/api/v1/hack-me/engagements \
>   -H "Authorization: Bearer $MORPH_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "hostname": "app.example.com",
>     "acceptedTerms": true,
>     "agreementVersion": "AGREEMENT_VERSION",
>     "expectedPriceCents": 50000
>   }'
> ```
>
> The response is `201` with `engagement`, which is `awaiting_payment`, and `checkoutUrl`.
>
> | Field | Required | |
> | :- | :- | :- |
> | `hostname` | yes | One public hostname |
> | `acceptedTerms` | yes | Must be `true` |
> | `agreementVersion` | yes | `agreementVersion` from the terms. Refused with `409` if the terms changed since |
> | `expectedPriceCents` | no | `priceCents` from the terms. Refused with `409` if the price differs |

The host is checked before checkout opens: a name that does not resolve, or that resolves to a private address, is refused and nothing is created.

## 2. Pay

Open the checkout page in a browser and pay \$500 plus tax by card. The page stops working after about 30 minutes. If you closed it or it expired, get a live one:

> [tab] CLI
>
> ```bash theme={null}
> morph hackme pay ENGAGEMENT_ID
> ```
>
> `pay` prints the checkout URL and opens it.

> [tab] Dashboard
>
> Select **Pay \$500.00 + tax** on the [Hack me](https://www.morphllm.com/dashboard/hack-me) page.

> [tab] API
>
> ```bash theme={null}
> curl -X POST https://api.morphllm.com/api/v1/hack-me/engagements/ENGAGEMENT_ID/checkout \
>   -H "Authorization: Bearer $MORPH_API_KEY"
> ```
>
> The response is `{ "checkoutUrl": "https://checkout.stripe.com/..." }`.

The engagement moves to `paid` once Stripe confirms the payment. Its `amountSubtotalCents`, `amountDiscountCents`, `amountTaxCents` and `amountTotalCents` are the receipt.

## 3. Prove control with DNS

Once you have paid, the engagement shows the TXT record that proves you control the host: `assessmentStatus` is `verifying` and `verification` holds the record.

```json theme={null}
{
  "status": "paid",
  "assessmentStatus": "verifying",
  "detail": "Waiting for the TXT record. It is checked automatically.",
  "verification": {
    "recordName": "_mindfort.app.example.com",
    "recordValue": "f0e1d2c3b4a5968778695a4b3c2d1e0f"
  }
}
```

Add a record of type `TXT` named `recordName` with the value `recordValue`, exactly as given, at your DNS provider. If your provider adds your domain to every name you enter, enter only the part of `recordName` before it. You can see what DNS returns with `dig +short TXT RECORD_NAME`.

The record is checked automatically, and testing starts as soon as it is found. DNS changes can take a few minutes to appear. To check now:

> [tab] CLI
>
> ```bash theme={null}
> morph hackme verify ENGAGEMENT_ID
> ```
>
> `verify` prints the record again if it is not found yet, with the reason, and exits `1`. It exits `0` once the assessment has started.

> [tab] Dashboard
>
> The [Hack me](https://www.morphllm.com/dashboard/hack-me) page shows the record's type, name and value with copy buttons. Select **Check now**.

> [tab] API
>
> ```bash theme={null}
> curl -X POST https://api.morphllm.com/api/v1/hack-me/engagements/ENGAGEMENT_ID/verify \
>   -H "Authorization: Bearer $MORPH_API_KEY"
> ```
>
> The response is `{ "engagement": ... }` after the check. Still `verifying`, its `detail` says why. A check runs at most once every 10 seconds.

## 4. Assessment

Once the record is found, the host is checked once more and the assessment starts: `status` becomes `dispatched` and `assessmentStatus` goes from `queued` to `running`. `activity.stages` lists the testing stages and where each one is. A full assessment takes several hours.

> [tab] CLI
>
> ```bash theme={null}
> morph hackme watch ENGAGEMENT_ID
> morph hackme info ENGAGEMENT_ID
> ```
>
> `watch` polls every 15 seconds and prints each change with the time: payment, the TXT record to publish, the record found, each testing stage. It exits `0` when the report is ready, and `1` if the assessment failed or was cancelled. Ctrl+C stops watching and changes nothing. `--interval <seconds>` sets how often it looks; `--json` prints one line of JSON per change.
>
> `info` prints the state, the payment, the TXT record while it is needed, the stages, a count of findings by severity, and any restarts.

> [tab] Dashboard
>
> The [Hack me](https://www.morphllm.com/dashboard/hack-me) page refreshes by itself and shows each stage as it runs.

> [tab] API
>
> ```bash theme={null}
> curl https://api.morphllm.com/api/v1/hack-me/engagements/ENGAGEMENT_ID \
>   -H "Authorization: Bearer $MORPH_API_KEY"
> ```
>
> Poll until `status` is `completed`, `failed` or `cancelled`. Reading also runs any check that is due, so this one call is enough to follow an engagement.

If another assessment of the same host is running, this one starts when that one finishes, and `detail` says so.

## 5. Read the report

When `status` is `completed`, `report.findings` holds the validated findings, highest severity first.

> [tab] CLI
>
> ```bash theme={null}
> morph hackme report ENGAGEMENT_ID
> morph hackme report ENGAGEMENT_ID --json
> ```
>
> `report` prints a table of the findings, then each one in full.

> [tab] Dashboard
>
> The findings are listed on the [Hack me](https://www.morphllm.com/dashboard/hack-me) page. Open one for where it is, the detail, the proof and the fix.

> [tab] API
>
> ```bash theme={null}
> curl https://api.morphllm.com/api/v1/hack-me/engagements/ENGAGEMENT_ID \
>   -H "Authorization: Bearer $MORPH_API_KEY"
> ```
>
> `report.findings` is a list. An empty list means nothing was found.

| Field | |
| :- | :- |
| `severity` | As reported, such as `critical`, `high`, `medium` or `low` |
| `class` | The kind of weakness, such as its OWASP category |
| `title` | The problem in one line |
| `where` | The endpoint where it was found |
| `detail` | What is wrong and its impact |
| `proof` | The evidence gathered against your host |
| `control` | How to fix it |
| `chain` | How it links with other findings into one attack, when it does |
| `status` | `confirmed`: validated against the live host |
| `id` | The finding's id |

Every field is plain text, and any of `where`, `detail`, `proof`, `control` and `chain` can be empty. When the report has findings of medium severity or higher, the person who started the engagement is also emailed a summary with a link to the dashboard.

## Engagement status

Act on `status`, and on `assessmentStatus` once the engagement is paid. `detail` adds one line in plain text when there is something to say, such as why it is waiting or why it failed.

| `status` | `assessmentStatus` | Meaning | What to do |
| :- | :- | :- | :- |
| `awaiting_payment` | `null` | Terms accepted, not paid. | Pay at the checkout page. |
| `paid` | `verifying` | Paid. Waiting for the DNS TXT record in `verification`. | Publish the record. |
| `paid` | `null` | Paid, and the assessment is being started. `detail` says if the start is delayed. | Nothing. |
| `dispatched` | `queued` | Started, waiting to run. | Nothing. |
| `dispatched` | `running` | Testing. `activity` shows the stages. | Nothing. |
| `completed` | `completed` | Done. `report` holds the findings. | Read the report. |
| `failed` | `failed` | The run failed. | [Restart it](#restart-a-failed-assessment) while `restart.available` is `true`. |
| `cancelled` | any | Cancelled before payment, stopped at your request, or refused. | Start a new engagement if you want one. |
| `awaiting_dns` | `null` | A draft from a retired flow. It cannot be continued. | Cancel it. |

`stopRequestedAt` is set once you ask to stop a paid assessment. Until the stop is confirmed, `status` still reads `paid` or `dispatched`.

Each engagement lists every attempt on its payment in `attempts`, oldest first. The payment fields (`paidAt` and the amounts) are always the payment's, on a restart too.

## Cancel or stop

> [tab] CLI
>
> ```bash theme={null}
> morph hackme cancel ENGAGEMENT_ID
> ```
>
> The prompt says what cancelling does to this engagement before you confirm. `-y` skips it.

> [tab] Dashboard
>
> Select **Cancel engagement** on an unpaid engagement, or **Stop assessment** on a paid one.

> [tab] API
>
> ```bash theme={null}
> curl -X POST https://api.morphllm.com/api/v1/hack-me/engagements/ENGAGEMENT_ID/cancel \
>   -H "Authorization: Bearer $MORPH_API_KEY"
> ```
>
> The response is `{ "engagement": ... }`. Repeating the call returns the same stop.

| Engagement | Result |
| :- | :- |
| Not paid | Cancelled. Nothing is charged, the checkout page stops working, and you can start a new engagement. Once a payment is submitted, it can no longer be cancelled this way. |
| Paid, testing not started | Cancelled at once. Nothing was run against your host. |
| Paid, testing started | Testing stops. The engagement reads `cancelled` once the stop is confirmed. Findings not yet reported are lost. |

A paid engagement you stop is not refunded automatically. Email [support@morphllm.com](mailto:support@morphllm.com) if you think it should be.

## Restart a failed assessment

A failed run can be run again on the same payment at no charge. The new attempt uses the host's existing verification, so a host that is still verified starts without a new DNS record. The host is checked again before testing starts.

A failed engagement carries `restart`:

| Field | |
| :- | :- |
| `available` | Whether it can be restarted now |
| `remaining` | Restarts this payment has left. A payment has 2 |
| `until` | End of the restart window, 7 days after payment |
| `requiresAcceptance` | The terms changed since you accepted them. Restarting accepts the current terms |
| `blockedReason` | Why a restart is not available now |
| `contactSupport` | No restart will become available. Email [support@morphllm.com](mailto:support@morphllm.com) about a refund |

> [tab] CLI
>
> ```bash theme={null}
> morph hackme restart ENGAGEMENT_ID
> ```
>
> The prompt shows the restarts left and, if the terms changed, the current terms to accept. `-y` skips it. The new attempt's ID is printed: follow that one.

> [tab] Dashboard
>
> Select **Restart** on the failed engagement.

> [tab] API
>
> ```bash theme={null}
> curl -X POST https://api.morphllm.com/api/v1/hack-me/engagements/ENGAGEMENT_ID/restart \
>   -H "Authorization: Bearer $MORPH_API_KEY"
> ```
>
> When `restart.requiresAcceptance` is `true`, read the terms and send `-H "Content-Type: application/json" -d '{ "acceptedTerms": true, "agreementVersion": "AGREEMENT_VERSION" }'` with the version you showed. The response is the new attempt as `engagement`, with its own `id`. Repeating the call returns the same attempt.

## Refunds

If Morph refuses to run a paid assessment, for example because the host no longer resolves only to public addresses when testing would start, the engagement ends as `cancelled` and `refundReason` says that Morph will refund the payment. Email [support@morphllm.com](mailto:support@morphllm.com) with any question about a payment.

## API routes

Every route is on `https://api.morphllm.com`, takes `Authorization: Bearer` with a Morph API key and returns JSON. An error is `{ "error": "..." }`, a sentence that says what to change. Schemas and example responses are in the [API reference](https://docs.morphllm.com/api-reference/endpoint/hack-me-terms.md).

| Route | |
| :- | :- |
| `GET /api/v1/hack-me/terms?hostname=HOST` | `priceCents`, `currency`, `agreementVersion`, `terms`, `checkoutOpen` |
| `GET /api/v1/hack-me/engagements` | `engagements`, newest first |
| `POST /api/v1/hack-me/engagements` | Start one: `{ "hostname", "acceptedTerms", "agreementVersion", "expectedPriceCents" }`. Returns `engagement` and `checkoutUrl` |
| `GET /api/v1/hack-me/engagements/{id}` | One engagement: `status`, `assessmentStatus`, `detail`, `verification`, `activity`, `report`, the payment amounts, `attempts`, `restart`, `refundReason` |
| `POST /api/v1/hack-me/engagements/{id}/checkout` | `checkoutUrl` for an unpaid engagement |
| `POST /api/v1/hack-me/engagements/{id}/verify` | Check the DNS TXT record now. Returns `engagement` |
| `POST /api/v1/hack-me/engagements/{id}/cancel` | Walk away unpaid, or stop a paid assessment. Returns `engagement` |
| `POST /api/v1/hack-me/engagements/{id}/restart` | Run a failed assessment again: `{ "acceptedTerms", "agreementVersion" }` only when the terms changed. Returns the new attempt as `engagement` |

| Status | Meaning |
| :- | :- |
| `400` | A field is missing or invalid, `acceptedTerms` is not `true`, or the hostname is not one public hostname. The message names it. |
| `401` | Missing or invalid API key. |
| `403` | A write was sent with an organization key whose owner is not an organization admin. |
| `404` | No such engagement in this account. Another account's engagement also returns `404`. |
| `409` | The request cannot be done as sent: the terms or the price changed, an engagement is already in progress, the host does not resolve only to public addresses, the engagement is already paid or finished, or a restart is not available. The message says which. |
| `502` | On starting: the engagement was created but its checkout page did not open. The body carries `engagementId`. Get the page with `morph hackme pay` or the checkout route; do not start another. |
| `503` | Checkout or assessments are paused, or the check that the host is public could not run. Retry later. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.