> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/a/attackforge.md).

# AttackForge

AttackForge is a platform for managing penetration tests and findings. OctoXLabs reads the users of the instance through the Self-Service API.

## Use cases

* Find AttackForge accounts that have no match in your directory.

```
Adapters = attackforge AND NOT Adapters = active-directory
```

* Check what one AttackForge connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination                                             | Port | Protocol |
| ------------------- | ------------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | Your AttackForge host (Enterprise Cloud or on premises) | 443  | HTTPS    |

### Required permissions

| Scope or role                    | Permission                  | Needed for                                               |
| -------------------------------- | --------------------------- | -------------------------------------------------------- |
| Administrator role               | n/a                         | Full user details (role, creation time, last login time) |
| getUsers Self-Service API method | Granted by an Administrator | Listing users                                            |

Use the key of a user with the Administrator role. Other roles see only part of each user's details. By default no user can call any Self-Service API method, so an Administrator must grant the key's user the `getUsers` method. Users without an email address are skipped.

## Create credentials in AttackForge

{% stepper %}
{% step %}

### Open the Self-Service API module

In the AttackForge UI, open the Self-Service API module as the user that owns the key.
{% endstep %}

{% step %}

### Create the key

Create your own Self-Service API key. The key does not expire.
{% endstep %}

{% step %}

### Grant getUsers

Ask an Administrator to grant the key's user the `getUsers` method.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter | Required | Type    | Default | Description                                                                                     |
| --------- | -------- | ------- | ------- | ----------------------------------------------------------------------------------------------- |
| Domain    | Yes      | String  | None    | Host name of your AttackForge instance, without `https://`. The API is reached over HTTPS only. |
| Api Key   | Yes      | String  | None    | Self-Service API key of an AttackForge user.                                                    |
| Proxy     | No       | String  | None    | Proxy address. The connector sends requests through `http://<value>`.                           |
| Timeout   | No       | Integer | 30      | Time in seconds to wait for API responses.                                                      |

## Troubleshooting

| Error message                                                          | Cause                                                                                                            | Fix                                                                                                                                           |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Status Code: 200 ...                                                   | AttackForge answered HTTP 200 with a reason in the `error` property, for example when `getUsers` is not granted. | Read the reason after the URL line. Grant the `getUsers` method and use an Administrator key.                                                 |
| Status Code: `, followed by the URL, the method and the response body` | The API answered with a status other than the one the adapter expects.                                           | Read the code and body. 401 or 403 usually points to wrong credentials or missing permissions. Check the address, port and Is Secure setting. |

## Change history

{% hint style="info" %}
Available starting from version 6.9.1.
{% endhint %}
