All URIs are relative to https://localhost:50443
| Method | HTTP request | Description |
|---|---|---|
| clear_command_queue | POST /api/v1/beacons/{bid}/clearCommandQueue | Clear Queue |
| delete_beacon | DELETE /api/v1/beacons/{bid} | Delete Beacon |
| execute_check_in | POST /api/v1/beacons/{bid}/execute/checkIn | DNS Beacon Checkin |
| get_beacon | GET /api/v1/beacons/{bid} | Get Beacons |
| list_beacons | GET /api/v1/beacons | List Beacons |
| set_note | POST /api/v1/beacons/{bid}/note | Set Note |
AsyncCommandResponse clear_command_queue(bid)
Clear Queue
Clear the Beacon queue of pending commands not yet distributed to the Beacon.
Related CS Console Command: clear
import asyncio
import os
import cs_sdk_python.api_client
from cs_sdk_python.api_client import ApiClient, Configuration
from cs_sdk_python.api_client.api import BeaconInfoApi
async def main():
config = Configuration(host="https://localhost:50443")
config.access_token = os.environ["CS_ACCESS_TOKEN"]
async with ApiClient(config) as client:
api = BeaconInfoApi(client)
response = await api.clear_command_queue(
bid='bid_example',
)
asyncio.run(main())Replace example values and populate the required model fields before running.
| Name | Type | Description | Notes |
|---|---|---|---|
| bid | str |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to API reference]
delete_beacon(bid)
Delete Beacon
Remove a Beacon session from the Beacon listing/GUI and Beacons data model.
Note: Prior to removing, active Beacons should be terminated with the ""exit"" command or {bid}/execute/exit route or they will re-appear once they check-in.
Related CS Aggressor function: beacon_remove()
import asyncio
import os
import cs_sdk_python.api_client
from cs_sdk_python.api_client import ApiClient, Configuration
from cs_sdk_python.api_client.api import BeaconInfoApi
async def main():
config = Configuration(host="https://localhost:50443")
config.access_token = os.environ["CS_ACCESS_TOKEN"]
async with ApiClient(config) as client:
api = BeaconInfoApi(client)
await api.delete_beacon(
bid='bid_example',
)
asyncio.run(main())Replace example values and populate the required model fields before running.
| Name | Type | Description | Notes |
|---|---|---|---|
| bid | str | Beacon id |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to API reference]
AsyncCommandResponse execute_check_in(bid)
DNS Beacon Checkin
Request DNS Beacon to send metadata to teamserver.
Related CS Console Command: checkin
import asyncio
import os
import cs_sdk_python.api_client
from cs_sdk_python.api_client import ApiClient, Configuration
from cs_sdk_python.api_client.api import BeaconInfoApi
async def main():
config = Configuration(host="https://localhost:50443")
config.access_token = os.environ["CS_ACCESS_TOKEN"]
async with ApiClient(config) as client:
api = BeaconInfoApi(client)
response = await api.execute_check_in(
bid='bid_example',
)
asyncio.run(main())Replace example values and populate the required model fields before running.
| Name | Type | Description | Notes |
|---|---|---|---|
| bid | str |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to API reference]
BeaconDto get_beacon(bid)
Get Beacons
Get metadata of the specified Beacon Id.
Related CS Aggressor function: beacon_info()
import asyncio
import os
import cs_sdk_python.api_client
from cs_sdk_python.api_client import ApiClient, Configuration
from cs_sdk_python.api_client.api import BeaconInfoApi
async def main():
config = Configuration(host="https://localhost:50443")
config.access_token = os.environ["CS_ACCESS_TOKEN"]
async with ApiClient(config) as client:
api = BeaconInfoApi(client)
response = await api.get_beacon(
bid='bid_example',
)
asyncio.run(main())Replace example values and populate the required model fields before running.
| Name | Type | Description | Notes |
|---|---|---|---|
| bid | str | Beacon id |
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to API reference]
List[BeaconDto] list_beacons()
List Beacons
Return a list containing metadata about each Beacon such as ID, Process, computer, listener, etc.
Related CS Aggressor function: beacons()
import asyncio
import os
import cs_sdk_python.api_client
from cs_sdk_python.api_client import ApiClient, Configuration
from cs_sdk_python.api_client.api import BeaconInfoApi
async def main():
config = Configuration(host="https://localhost:50443")
config.access_token = os.environ["CS_ACCESS_TOKEN"]
async with ApiClient(config) as client:
api = BeaconInfoApi(client)
response = await api.list_beacons()
asyncio.run(main())Replace example values and populate the required model fields before running.
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to API reference]
AsyncCommandResponse set_note(bid, request_model)
Set Note
Assigns a note to the Beacon.
Related CS Console Command: note
import asyncio
import os
import cs_sdk_python.api_client
from cs_sdk_python.api_client import ApiClient, Configuration
from cs_sdk_python.api_client.api import BeaconInfoApi
async def main():
config = Configuration(host="https://localhost:50443")
config.access_token = os.environ["CS_ACCESS_TOKEN"]
async with ApiClient(config) as client:
api = BeaconInfoApi(client)
response = await api.set_note(
bid='bid_example',
request_model=cs_sdk_python.api_client.NoteDto(),
)
asyncio.run(main())Replace example values and populate the required model fields before running.
| Name | Type | Description | Notes |
|---|---|---|---|
| bid | str | ||
| request_model | NoteDto |
- Content-Type: application/json
- Accept: /
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to API reference]