98 - Fidelis Deception RESTful API Guide
98 - Fidelis Deception RESTful API Guide
Version 9.8
October 2024
Copyright © 2024 by Fidelis Security LLC
All rights reserved worldwide.
Users are granted permission to copy and/or distribute this document in its original electronic form and
print copies for personal use. This document cannot be modified or converted to any other electronic or
machine-readable form in whole or in part without prior written approval of Fidelis Security LLC.
While we have done our best to ensure that the material found in this document is accurate, Fidelis
Security LLC makes no guarantee that the information contained herein is error free.
Parameters
commandPostName=name
Required. Specifies the CommandPost to which to communicate. All the Deception APIs have
commandPostName as in input parameter.
Example
commandPostName=Console
Return Codes
Code Description
200 Success
401 Unauthorized. Use does not have permissions for the API.
403 Forbidden. Login is required.
404 Not found.
You can then use the cookies for Deception and Terrain APIs commands.
This section describes how you can manually identify the CAS-ID, request the TGC cookies, and use the
TGC cookies for an API command. It also includes instructions for how to use Python to automate each
step.
Note: APIs that require uploading files require a different authentication that is not currently described
in this section/guide. If you require authentication for APIs that require uploading files, contact Fidelis
Support.
2. Using the web browser features, view the page source for the CommandPost login page.
def get_cas_id(host):
request = requests.get('https://'+host+'/cas/login', verify=False)
for line in str(request.content).split('\\n'):
if re.search("input type=\"hidden\"", line):
return line.split("value=\"")[1].split("\"")[0]
return ""
login_response = requests.post('https://'+host+'/cas/login',
verify=False,
data={"username":USERNAME,"password":PASSWORD,"execution":CASID,"_event
Id":"submit"})
Add the following command to each command. Example below for running a GET API to this URL: API-
URL
Method POST
Query Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Example
/mgm/rest/assets/getAll?commandPostName=Console
Example
{"pagination":{"page":1,"size":15}}
order:[list of {"column":"AssetField","direction":"direction"}]
Specify the sort order of the returned results.
"column":AssetField
Use one of the following values for AssetField:
ACTIVE_DIRECTORY_CONTAINER ANOMALIES_MAX_SCORE ANY_PORT
ACTIVE_DIRECTORY_GROUP ANY_COUNTRY_CODE ANY_STRING
ACTIVE_DIRECTORY_STRUCTURE ANY_COUNTRY_NAME ASSET_ID
AD_LOCATION ANY_DOMAIN ASSET_IDS
AGENT_ID ANY_ENDPOINT ASSET_IP
AGENT_TYPE ANY_ENDPOINT_IDS ASSET_NAME
ALERTS_COUNT ANY_IP ASSETS_COUNT
ALLOW_SET_AS_DECOY
BC_AUTO_UPDATING BREADCRUMBS_COUNT
FILE_SYSTEM_ID FIRST_SEEN
K8_NAMESPACE
MAC_ADDRESS MASTER_DECOY_ID
WEB_SERVER_ID WEB_SERVER_NAME
{"order":[
{"column":"FIRST_SEEN","direction":"ASC"},
{"column":"ASSET_IP", "direction":"ASC"}]}
"countOnly":true|false
Whether to return counts of the columns or the values for the columns.
• true – return the count of the different groups specified by the columns parameter
• false – return the groups with their columns parameter values and their size
"ignoreZeroValues":true|false
When countOnly is true, whether to ignore zero values.
Example 1
The following shows the settings to return a count of assets grouped by their subnet and risk.
Note that assets with subnet_id value of 0 are assets without a subnet.
{"groupBy":{
"columns":["RISK","SUBNET_NAME"], "countOnly": false, "ignoreZeroValues":
false}}
The following shows sample results with subnet “10.6.64.0/22” that has:
• 5 assets with risk value of 1
• 25 assets with risk value of 2
{
"nodes": [
{
"SUBNET_NAME": "10.6.64.0/22",
"RISK": 1,
"COUNT": 5
},
{
"SUBNET_NAME": "10.6.64.0/22",
"RISK": 2,
"COUNT": 25
},
{"groupBy":{
"columns":["ROLE"], "countOnly": false, "ignoreZeroValues": false}}
{
"nodes": [
{
"ROLE": "ROUTER",
"COUNT": 5
},
{
"ROLE": "IT_SERVER",
"COUNT": 4
},
{
"ROLE": "PRINTER",
"COUNT": 18
},
{
"ROLE": "DOMAIN_NAME_SERVER",
"COUNT": 9
},
{
"ROLE": null,
"COUNT": 4499
},
{
"ROLE": "WORKSTATION",
"COUNT": 6025
},
{
"ROLE": "GENERAL_SERVER",
"COUNT": 2
}
{"groupBy":{
"columns":["SUBNET_ID"], "countOnly": true, "ignoreZeroValues": true}}
{
"nodes": [
{
"SUBNET_ID": 14
}
],
"conf": {
"numDecoys": 5,
"numAssets": 10557,
"numNoAuthAssets": 10557,
"numDecoysFiltered": 5,
"numNoAuthDecoys": 5,
"numAssetsFiltered": 10557
},
"subnets": null,
"groups": null,
"total": 1,
"sslDatas": null,
"containerImages": null
}
Example
The following filter returns all assets that are either a workstation or a web server.
{
"filter": {
"composite": {
"logic": "or",
"filters": [
{
"simple": {
"column": "ROLE",
"operator": "=",
"value": "WORKSTATION"
}
},
{
"simple": {
"column": "ROLE",
"operator": "=",
"value": "WEB_SERVER"
}
}
]
}
}
}
URL /mgm/rest/assets/getAll?commandPostName=name
Request {"filter":{"composite":{"logic":"and","filters":[{"simple":{"column":"A
body SSET_ID","operator":"!=","value":"8960"}},{"simple":{"column":"SUBNET_I
D","operator":"=","value":"2"}}]}},"pagination":{"page":1,"size":15},"o
rder":[{"column":"RISK","direction":"DESC"}]}
Path /mgm/rest/assets/asset-ID?commandPostName=name
Path Parameters
asset-ID
Specifies the ID of the asset for which you want information.
Example
1725
Query Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Example
commandPostName=Console
Example
/mgm/rest/assets/1725&commandPostName=Console
Path /mgm/rest/assets/delete?nodeIds=asset-IDs&purgeAsset=true|false&forcePrompted
=true &forceDelete=true|false&&commandPostName=name
Method PUT
Query Parameters
nodeIds=asset-IDs
Specifies the IDs of the assets to delete. To specify multiple IDs, specify the parameter multiple times.
purgeAsset=true|false
Whether you want to also purge the alerts associated with the assets.
forcePrompted=true
Indicates you want to skip being prompted to confirm deleting assets with breadcrumbs. (Note that
prompt is insignificant when using the API.)
forceDelete=true|false
Whether to delete assets with breadcrumbs. Set to true to delete assets with breadcrumbs. Set to faluse
to skip deletion of assets with breadcrumbs. The default is false.
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Examples
/mgm/rest/assets/delete?nodeIds=24&purgeAsset=true&commandPostName=Console
/mgm/rest/assets/delete?nodeIds=24&nodeIds=25&forcePrompted=true&forceDelete=true&
purgeAsset=true&commandPostName=Console
Path /mgm/rest/assets/editAssets?nodeIds=asset-IDs&role=asset-role&
osType=asset_OS &commandPostName=name
Method PUT
Parameters
nodeIds=asset-IDs
Specifies the IDs of the assets to delete. To specify multiple IDs, specify the parameter multiple times.
role=asset-role
Specifies the role of the decoy. Use one of the following:
Example
Role=ROUTER
osType=asset_OS
Specifies the operating system to use for the decoy. Use one of the following:
Example
osType=WINDOWS_XP
Example
/mgm/rest/assets/editAssets?nodeIds=20&
nodeIds=21&role=ROUTER&osType=CENTOS_7_2&commandPostName=Console
Path /mgm/rest/subnets/getAll?commandPostName=name
Method POST
Query Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Parameters
filter:{"composite":{"logic"=and|or , "filters":["simple": {"column": AssetField,
"operator":=|!=|>|>=|<|<=|IN|!IN|=~|, "value":string}, "simple":{}…]}}
Use the filter parameter from Terrain API – Assets to return only subnets with the filtered assets. The
system returns all subnets if you do not specify a parameter.
Example
URL /mgm/rest/subnets/getAll?commandPostName=name
Request {"filter": {"composite": {"logic": "or", "filters": [{"simple":
body {"column": "ROLE","operator": "=","value": "WORKSTATION"}}]}}}
Path /mgm/rest/computerGroup?commandPostName=name
Method POST
Query Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Example
/mgm/rest/computerGroup/getAll?commandPostName=Console
Define Subnet
Path /mgm/rest/subnets?commandPostName=name
Method POST
Parameters
ipVersion=number
Specifies the IP version. For number, you must specify either 4 or 6.
subnetIp=ip
Specifies the internal IP address.
cidr=number
Specifies the CIDR.
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Note:
You can only use this API when decoys are not configured on the specified subnet. For subnets that
contain decoy, you must manually edit the subnet on the Deception / Decoys / Decoys page.
Example
URL /mgm/rest/subnets?commandPostName=Console
Request {"ipVersion":4,"subnetIp":10.6.19.0,"cidr:"24,"approve":true}
body
Path /mgm/rest/assets/getAllDecoys?commandPostName=name
Method GET
Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Form Parameters
See Get All Assets for parameters and examples.
Path /mgm/rest/machine?commandPostName=name
Method GET
Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Example
/mgm/rest/machine?commandPostName=Console
Path /mgm/rest/intguard/conf?commandPostName=name
Method PUT
Form Parameters
isIcmpEchoEnabled: true|false
Whether you want Decoys to respond with ICMP echo replies to ICMP echo requests.
Example
isIcmpEchoEnabled: true
Example
isNBDSEnabled: true
isStealthModeEnabled: true|false
Whether to use stealth mode. In stealth mode decoys do not respond to whitelisted IP addresses, for
example, scanners.
Example
isStealthModeEnabled: true
isWPADEnabled: true|false
Whether to enable Proxy Auto Discovery
Example
isWPADEnabled: true
isLLMNREnabled: true|false
Whether you want decoys to search for non-existing resources via Link-Local Multicast Name Resolution
(LLMNR).
Example
isLLMNREnabled: true
isARPSpoofingEabled: true|false
Whether you want decoys to attempt to open connections to other assets in the subnet and inject decoy
information to the Asset ARP table.
Example
isARPSpoofingEabled: true
ARPSpoofingFrequency: frequency
How often you want decoys to send ARP packets. Use one of the following:
Example
ARPSpoofingFrequency: LOW
isArpMITMEnabled
isNbnsBroadcastReplyingEnabled
isDhcpDynamicDnsEnabled
isDecoyInteractionTimeoutEnabled
decoyInteractionTimeoutSec
vmAnalysisTimeoutSec
Example
ARPSpoofingAssetsToInject: FEW
isDNSEnabled: true|false
Whether you decoys periodically to validate their name and IP address settings on the DNS server.
Example
isDNSEnabled: true
fileSizeSpoofingMode: size
The size of the decoy file during download. Use one of the following:
• NO_SPOOFING – Use the original file size.
• LINEAR – Increase the file size linearly.
• INFINITE
Example
fileSizeSpoofingMode: LINEAR
isMacSpoofingEnabled: true|false
Whether you want each decoy to create a unique MAC address. Changing this configuration will only
affect new decoys that are created.
Example
isMacSpoofingEnabled: true
isInfiniteFoldersEnabled: true|false
Whether you want decoys to have random directories providing infinite traversal paths.
Example
isInfiniteFoldersEnabled=true
isRealFilesEnabled: true|false
Whether to enable the use of real files on decoys.
Example
isRealFilesEnabled: true
isWanAccessEnabled: true|false
Whether to allow real OS decoys access from the decoy to the public network.
Example
isWanAccessEnabled: true
DNSFrequency: frequency
How often you want decoys to query the DNS server. Use one of the following:
• HIGH – Decoys query the DNS server every 2 hours.
• MEDIUM – Decoys query the DNS server every 10 hours.
• LOW – Decoys query the DNS server every 24 hours.
Example
DNSFrequency: HIGH
enableUpnp: true|false
Whether decoys will respond when directly accessed over UPnP.
Example
enableUpnp: true
enableUpnpNotify: true|false
Whether decoys will periodically send relevant NOTIFY multicast messages.
Example
enableUpnpNotify: true
isDhcpDiscoverEnabled: true|false
Whether a DHCP discover packet is sent on each subnet identified on the decoy NICs. The system uses
the responses for analysis and validation of the network configurations.
Example
isDhcpDiscoverEnabled: true
isGatewayValidationEnabled: true|false
Whether to enable subnet gateway validation by sending ARP packets from interface’s MAC address.
Example
isGatewayValidationEnabled: true
isMacSpoofingValidationEnabled: true|false
Whether to enable subnet gateway validation by sending ARP packets from a decoy’s MAC address. If
there are no decoys, the system sends the packet with a generated fake MAC address.
Example
isMacSpoofingValidationEnabled: true
Example
isPeriodicDecoyValidationEnabled: true
isPreConfDecoyValidationEnabled: true|false
Whether you want the decoys IP addresses and MAC address validated before creation.
Example
isPreConfDecoyValidationEnabled: true
isWakeOnLanEthEnabled: true|false
Whether you want to monitor and trigger alerts on "Wake-on-LAN" packets sent to the decoys on layer 2.
Example
isWakeOnLanEthEnabled: true
isWakeOnLanUDPEnabled: true|false
Whether you want to monitor and trigger alerts on "Wake-on-LAN" packets sent to the decoys on layer 4.
Example
isWakeOnLanUDPEnabled: true
isArpMITMEnabled: true|false
Whether you want MITM attacks identified. Note that MAC spoofing must be enabled.
Example
isArpMITMEnabled: true
isNbnsBroadcastReplyingEnabled: true|false
Whether you want to enable decoy to respond to NBNS broadcasts.
Example
isNbnsBroadcastReplyingEnabled: true
isDhcpDynamicDnsEnabled: true|false
Whether you want the decoys to update the DHCP server with dynamic DNS data as part of the DHCP IP
allocation flow. The DHCP and DNS servers must be configured to enable dynamic DNS updates.
Example
isDhcpDynamicDnsEnabled: true
isDecoyInteractionTimeoutEnabled: true|false
Whether you want to enable the interaction timeout for emulated decoys.
Example
isDecoyInteractionTimeoutEnabled: true
Example
decoyInteractionTimeoutSec: 600
vmAnalysisTimeoutSec: seconds
Set the interaction timeout for real OS decoys. Specify timeout in seconds. Real OS decoys will
disconnect sessions after reaching this timeout and revert to their original state.
Example
vmAnalysisTimeoutSec: 600
Query Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Example
/mgm/rest/intguard/conf?commandPostName=Console
isIcmpEchoEnabled: true
isNBDSEnabled: true
isStealthModeEnabled: false
isWPADEnabled: false
isLLMNREnabled: false
isARPSpoofingEabled: true
ARPSpoofingFrequency: HIGH
ARPSpoofingAssetsToInject: SOME
isDNSEnabled: true
fileSizeSpoofingMode: NO_SPOOFING
isMacSpoofingEnabled: true
DNSFrequency: MEDIUM
isInfiniteFoldersEnabled: true
isRealFilesEnabled: true
isWanAccessEnabled: true
isLanAccessEnabled: false
enableUpnp: true
enableUpnpNotify: false
enableUpnpMsearchAnswer: false
isDhcpDiscoverEnabled: true
isGatewayValidationEnabled
isMacSpoofingValidationEnabled: true
isPeriodicDecoyValidationEnabled: true
isPreConfDecoyValidationEnabled: true
isWakeOnLanEthEnabled: true
isWakeOnLanUDPEnabled: true
Decoys
Create Decoy
Path /mgm/rest/deception/createDecoys?commandPostName=name
Method POST
Example
decoyCount: 1
ipRanges: list
Specifies a list of Decoy IP Ranges if nodeIp is empty.
Example
ipRanges: [{ lowest:192.168.10.12, highest: 192.168.10.50, lowestInt:
3232238092, highestInt: 3232238130}]
approve: true|false
Specifies whether to force decoy creation even if the chosen IP addresses are used by assets.
Example
approve: true
ignoreSubnetValidation: true|false
Specifies whether to ignore the subnet’s gateway validation.
• When set to true, the subnet’s gateway validation is ignored.
• When set to false, the system does not allow decoy creation in non-validated subnets.
Example
ignoreSubnetValidation: true
Example
subnetId: 5
hpRateLimit: type
Specifies the speed at which the decoy responds to packets. Use one of the following:
• VERY_LOW
• LOW
• NORMAL
Example
hpRateLimit: NORMAL
decoyCount: number
Specifies the number of Decoys to create.
Example
decoyCount: 1
createType: type
Specifies the decoy creation type. Use one of the following:
Example
createType: CUSTOM
decoyType: type
Specifies the type of decoy. Use one of the following:
• EMULATED
• VM
• ADDITIONAL_IP
Example
decoyType: EMULATED
• ACCEPT
• REJECT
• DROP
Example
hpMode: DROP
deviceType: type
Specifies the type of device. Use one of the following:
• IOT
• COMPUTER
Example
deviceType: COMPUTER
osType: os
Specifies the operating system to use for the decoy. Use one of the following:
Example
osType: WINDOWS_XP
computerRole: role
Specifies the role of the decoy. Use one of the following:
Example
computerRole: DATABASE_SERVER
Example
mgmtGroup: 1
groupId: id
Specifies the ID of the group/domain of the decoy. To retrieve the group ID, use the Get All Groups and
Domains Data.
Example
groupId: 1
sslDataType: type
Specifies whether to use domain SSL configuration, global configuration, or create a new configuration by
template. Use one of the following:
• GLOBAL
• DOMAIN
• TEMPLATE
Example
sslDataType: GLOBAL
fileSystemId: id
Specifies the ID of the file system. This is relevant for user-defined file systems. The default is -1.
Example
fileSystemId: -1
nodeName: name
Specifies the name of decoy. For auto-name generation, omit this parameter or leave the value blank.
nodeIp: ip
Specifies the IP address or range of IP addresses available for the decoy. Specify a valid IP address or
range. You must specify an IP address if DHCP is not enabled.
Examples
nodeIp: 192.168.10.12
nodeIp: 192.168.10.12-192.168.10.50
Example
subnetId: 5
"gateway": "string"
Specifies the subnet’s gateway.
Example
"gateway": "192.168.0.1"
"interfaceName": "string"
Specifies the subnet’s interface name.
Example
"interfaceName": "eth2"
vlan: tag
Specifies the VLAN to use for the Decoy. Use one of the following:
• 0 – for no VLAN.
• tag – valid VLAN tag
Example
vlan: 0
useIpsFromAdaptiveRanges: true|false
Specifies whether to use ipRanges if both nodeIp and ipRanges exist.
Example
useIpsFromAdaptiveRanges: false
vendor: vendor
Specifies the IOT device vendor.
Example
vendor: Cisco
deviceName: name
Specifies the IOT device vendor.
Example
deviceName: Cisco Switch
Example
interfaceName: eth1
componentId: id
Specifies the valid component ID of a Decoy server. Sensor ID is fetched by this parameter.
Example
componentId: 132
isDhcp: true|false
Whether to use DHCP for the decoy IP address.
Example
isDhcp:true
ovaId: id
Specifies the ova record ID in case of VM decoy creation.
Example
ovaId: 10
webServer: id
Specifies the ID of the web server to present on decoys with HTTP services.
Example
webserver: 30
sensorOffline: true|false
Specifies whether to force decoy creation even if the decoy sensor is offline.
Example
sensorOffline: true
masterDecoyId: id
Specifies the ID of the main decoy when decoyType is ADDITIONAL_IP.
Example
masterDecoyId: 5
wan: true|false
Specifies whether to allow Real OS decoys access from the decoy to the public network.
Example
wan: true
Example
lan: true
isCloud: true|false
Specifies whether the decoy is a cloud decoy. This forces DHCP and sets vlan to 0.
Example
isCloud: true
advancedMap: json
Specifies advanced SSH settings for the decoy.
Example
advancedMap: {SSH: {SERVER: "{{CRLF}}Last login: {{LASTLOGIN}} on
tty1{{CRLF}}{{CRLF}}",HOME_DIRECTORY: "/Users/%username%"}}
macAddress: mac
Specifies the mac address for the decoy.
Example
mac: 12:34:56:78:90:ab
Query Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Path /mgm/rest/intguard/delete?commandPostName=name
Method PUT
Form Parameters
nodeIDs: ids
Specifies the IDs of the Decoys to delete.
Example
nodeIDs: 1725
approve: true|false
Specifies whether to force decoy deletion even if it was generated by adaptive deception.
Example
approve: true
sensorOffline: true|false
Specifies whether to force decoy deletion even if the decoy sensor is offline.
Example
sensorOffline: true
forceDeleteAdditionalIpDecoys: true|false
Specifies whether to force additional IP decoys deletion.
Example
forceDeleteAdditionalIpDecoys: true
Query Parameters
commandPostName=name
Specifies the CommandPost to which to communicate. For a single CommandPost, use Console. For a
Hierarchical Manager (HM) system, specify the CommandPost.
Example
/mgm/rest/intguard/delete?commandPostName=Console
nodeIds: 24
Path /mgm/rest/intguard/decoyId?commandPostName=name
Method PUT
Parameters
Edit Decoy uses the same parameters as Create Decoy. For all parameters, descriptions, and usages,
see Create Decoy.