Analytics Agent Configuration v1.0.0
Analytics Agent Configuration
Analytics Agent Configuration v1.0.0
Recognized Detections
The following detections found at runtime are configurable in v1.0.0
|
|
For more information about the detections, please refer to Detection Quick Guide.
Available Responses
The following response options are available in this version of the analytics agents configuration.
- Report
- Hard Exit
- Soft Exit
- Notify
- Open URL
- Popup
- NOP
- Sleep
These are described in further details below.
Response Details
Report
Report will push data to the remote analytics service and make the detection data available in the dashboards.
Notify
Notify uses the XTD SDK to notify the application about the detection. The notification is propagated to the application via the XTD SDK callback as a JSON payload. Refer to the XTD SDK documentation for how to handle this.
Open URL
Opens a pre-defined URL using the operating system browser. The final URL will include the numeric detection value as a query parameter. The name of this parameter is detectionType.
https://www.protectmyapp.com/?detectionType=100The query parameter can be used to customize the page being displayed based on the numeric detection value.
See XTD SDK for the values for the detection types.
https://www.protectmyapp.com/?detectionType=100Shows a popup/toast with a user definable text. The text supports minor substitution. The token $E$ (dollar E dollar) will be substituted with the numeric detection identifier.
See XTD SDK for the values for the detection types.
Popup
Shows a popup/toast with a user definable text. The text will be suffixed with the numeric detection, for example (100), to indicate the exact detection type.
See XTD SDK for the values for the detection types.
Hard Exit
Application will be shutdown, using a hard-crash approach.
Soft Exit
Application will be shutdown gracefully, using a system exit approach.
NOP
No operation, does nothing.
Sleep
Performs a sleep for a user definable amount of milliseconds. Any further custom responses will be delayed until the sleep completes.
Defining Defaults
It is possible to define a default set of custom responses which should be used if no, more specific, detection configuration is found.
By using the "default" detection value in the configuration JSON, the responses configured for it will be used in the case where no more specific detection matches.
Full Example
{
"version": 1,
"customResponses": {
"detections": [
{
"type": "default",
"responses": [
{
"type": "Report"
},
{
"type": "Notify"
},
{
"type": "SoftExit"
}
]
},
{
"type": "BootloaderDetected",
"responses": [
{
"type": "Report"
},
{
"type": "Notify"
},
{
"type": "Popup",
"message": "Bootloader detected! Error code: $E$"
},
{
"type": "Sleep",
"ms": 3000
},
{
"type": "HardExit"
}
]
},
{
"type": "DebuggerDetected",
"responses": [
{
"type": "Report"
},
{
"type": "Notify"
},
{
"type": "OpenUrl",
"url": "https://www.protectmyapp.com"
},
{
"type": "SoftExit"
}
]
},
{
"type": "EmulatorDetected",
"responses": [
{
"type": "NOP"
}
]
},
{
"type": "OverlayDetected",
"responses": [
{
"type": "NOP"
}
]
},
{
"type": "RootingDetected",
"responses": [
{
"type": "NOP"
}
]
},
{
"type": "SideLoadingDetected",
"responses": [
{
"type": "NOP"
}
]
},
{
"type": "TamperingDetected",
"responses": [
{
"type": "NOP"
}
]
},
{
"type": "HookingDetected",
"responses": [
{
"type": "NOP"
}
]
},
{
"type": "MITMDetected",
"responses": [
{
"type": "NOP"
}
]
},
{
"type": "VPNDetected",
"responses": [
{
"type": "NOP"
}
]
}
]
}
}Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://verimatrix.com/xtd/analytics.agent.configuration.schema.json",
"title": "Analytics Agent Configuration",
"description": "Analytics Agent Configuration",
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"type": "integer",
"minimum": 1
},
"customResponses": {
"type": "object",
"properties": {
"detections": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"responses"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"default",
"BootloaderDetected",
"DebuggerDetected",
"EmulatorDetected",
"OverlayDetected",
"RootingDetected",
"SideLoadingDetected",
"TamperingDetected",
"HookingDetected",
"HostnameWhitelistViolation",
"InstallerMismatch",
"MITMDetected",
"VPNDetected",
"ProxyDetected",
"DNSConsensus",
"ScreenshotDetected",
"ScreenRecordingDetected"
]
},
"responses": {
"type": "array",
"items": {
"anyOf": [
{
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"const": "Report"
}
}
},
{
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"const": "HardExit"
}
}
},
{
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"const": "SoftExit"
}
}
},
{
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"const": "Notify"
}
}
},
{
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"const": "NOP"
}
}
},
{
"required": [
"type", "url"
],
"type": "object",
"properties": {
"type": {
"const": "OpenUrl"
},
"url": {
"type": "string",
"format": "uri"
}
}
},
{
"required": [
"type", "ms"
],
"type": "object",
"properties": {
"type": {
"const": "Sleep"
},
"ms": {
"type": "integer",
"minimum": 1000,
"maximum": 10000
}
}
},
{
"required": [
"type",
"message"
],
"type": "object",
"properties": {
"type": {
"const": "Popup"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
}
]
},
"additionalProperties": false
}
}
}
}
}
}
},
"additionalProperties": false
}