FireEye Central Management
FireEye Central Management (CM Series) is the FireEye threat intelligence hub. It services the FireEye ecosystem, ensuring that FireEye products share the latest intelligence and correlate across attack vectors to detect and prevent cyber attacks.
Analytics & SIEM · FireEye Central Management
Details
| ID | FireEye Central Management |
|---|---|
| Provider | Trellix |
| Category | Analytics & SIEM |
| From Version | 5.5.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Supported Modules | Agentix XSIAM |
README
FireEye Central Management (CM Series) is the FireEye threat intelligence hub. It services the FireEye ecosystem, ensuring that FireEye products share the latest intelligence and correlate across attack vectors to detect and prevent cyber attacks
This integration was integrated and tested with version 9.0.2 of FireEye Central Management
API Key management
This integration generates an API Key from the username and password given to be authenticated with FireEye.
The API Key is valid for 15 minutes.
The integration manages the storage of this key, and its re-generation when the key expires.
Fetch FireEye EX Alert Emails
To fetch a FireEye EX alert email, you will need the UUID.
- Run the fireeye-cm-get-alert-details** command with the alert ID. For example,
**!fireeye-cm-get-alert-details alert_id=542* - Locate the UUID in the context data and run the fireeye-cm-get-artifacts-by-uuid command with the UUID. For example:
!fireeye-cm-get-artifacts-by-uuid uuid=243a2555-a915-47a1-a947-e71049f4971c - Download the email.
Access the FireEye Alert URL
To display a proper link in the FireEye NX Alert URL field of the FireEye NX or EX Alert layout, you need to configure the hostname in the appliance settings of the FireEye application.
- Log in to your FireEye application.
- Navigate to Appliance Settings > Network > Hostname.
- In the Hostname field, enter your URL/server/ip address.
Configure FireEye Central Management in Cortex
| Parameter | Required |
|---|---|
| Your server URL | True |
| Username | True |
| Fetch incidents | False |
| Max incidents to fetch | False |
| First fetch timestamp (<number> <time unit>, e.g., 12 hours, 7 days, 3 months, 1 year) | False |
| Incident type | False |
| Info level for fetched alerts | False |
| Trust any certificate (not secure) | False |
| Use system proxy settings | False |
Commands
You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
fireeye-cm-get-alerts
Searches and retrieves FireEye CM alerts based on several filters.
Base Command
fireeye-cm-get-alerts
Input
| Argument Name | Description | Required |
|---|---|---|
| alert_id | The ID number of the alert to retrieve. | Optional |
| duration | The time interval to search. This filter is used with either the start_time or end_time filter. If duration, start time, and end time are not specified, the system defaults to duration=12_hours, end_time=current_time. If only the duration is specified, the end_time defaults to the current_time. Possible values are: 1_hour, 2_hours, 6_hours, 12_hours, 24_hours, 48_hours. | Optional |
| start_time | The start time of the search. This filter is optional. Syntax: start_time=YYYY-MM-DDTHH:mm:ss.sss-OH:om or ‘1 day/month/year’. Default is 1 day. | Optional |
| end_time | The end time of the search. This filter is used with the duration filter. If the end_time is specified but not the duration, the system defaults to duration=12_hours, ending at the specified end_time. Syntax: end_time=YYYY-MM-DDTHH:mm:ss.sss-OH:om. | Optional |
| callback_domain | Searches for alerts that include callbacks to the specified domain. | Optional |
| dst_ip | The destination IPv4 address related to the malware alert. | Optional |
| src_ip | The source IPv4 address related to the malware alert. | Optional |
| file_name | The name of the malware file. | Optional |
| file_type | The malware file type. | Optional |
| info_level | The level of information to be returned. Possible values: “concise”, “normal”, and “extended”. Possible values are: concise, normal, extended. Default is concise. | Optional |
| malware_name | The name of the malware object. | Optional |
| malware_type | The type of the malware object. Possible values: “domain_match”, “malware_callback”, “malware_object”, “web_infection”, “infection_match”, “riskware-infection”, “riskware-callback”, “riskware-object”. Possible values are: domain_match, malware_callback, malware_object, web_infection, infection_match, riskware-infection, riskware-callback, riskware-object. | Optional |
| md5 | Searches for alerts that include a specific MD5 hash. | Optional |
| recipient_email | The email address of the malware object receiver. | Optional |
| sender_email | The email address of the malware object sender. | Optional |
| url | Searches for a specific alert URL. | Optional |
| limit | Maximum number of alerts to return. Default is 20. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| FireEyeCM.Alerts.id | String | The ID of the alert. |
| FireEyeCM.Alerts.uuid | String | The UUID of the alert. |
| FireEyeCM.Alerts.occurred | String | The time when the alert occurred. |
| FireEyeCM.Alerts.product | String | The product name of the alert. |
| FireEyeCM.Alerts.rootInfection | String | The ID of the infection associated with the malware alert. |
| FireEyeCM.Alerts.name | String | The link to the infection associated with the malware alert. |
| FireEyeCM.Alerts.vlan | String | The virtual LAN (VLAN) of the alert. |
| FireEyeCM.Alerts.malicious | String | A flag indicating whether the alert is malicious. |
| FireEyeCM.Alerts.severity | String | The severity of the alert. |
| FireEyeCM.Alerts.sensor | String | The sensor name that the alert is associated with. |
| FireEyeCM.Alerts.applianceId | String | The appliance ID of the alert. |
| FireEyeCM.Alerts.sensorIp | String | The sensor IP that the alert is associated with. |
| FireEyeCM.Alerts.ack | String | A flag indicating whether an acknowledgment is received. |
| FireEyeCM.Alerts.src | Unknown | The source of the alert. |
| FireEyeCM.Alerts.dst | Unknown | The destination of the alert. |
| FireEyeCM.Alerts.explanation | Unknown | The explanation data of the alert. |
Command Example
#### Context Example
```json
{
"FireEyeCM": {
"Alerts": [
{
"ack": "no",
"action": "notified",
"alertUrl": "https://FireEyeCM/event_stream/events_for_bot?ev_id=35685",
"applianceId": "test",
"attackTime": "2021-06-10 21:52:43 +0000",
"dst": {
"ip": "1.1.1.1",
"mac": "00:50:56:94:b8:42",
"port": 443
},
"explanation": {
"malwareDetected": {
"malware": [
{
"name": "Trojan.Malicious.SSL.Certificate.Dridex"
}
]
},
"osChanges": []
},
"id": 35685,
"malicious": "yes",
"name": "MALWARE_CALLBACK",
"occurred": "2021-06-10 21:52:43 +0000",
"product": "WEB_MPS",
"rootInfection": 34670,
"scVersion": "1163.102",
"sensor": "sensor",
"sensorIp": "1.1.1.1",
"severity": "CRIT",
"src": {
"ip": "1.1.1.1",
"port": 8080
},
"uuid": "529023c0-6ddf-4933-9241-fe4ec71a788e",
"vlan": 0
}
]
}
}
Human Readable Output
FireEye Central Management Alerts
id occurred product name malicious severity alertUrl 35685 2021-06-10 21:52:43 +0000 WEB_MPS MALWARE_CALLBACK yes CRIT https://FireEyeCM/event_stream/events_for_bot?ev_id=35685
fireeye-cm-get-alert-details
Searches and retrieves the details of a single alert.
Base Command
fireeye-cm-get-alert-details
Input
| Argument Name | Description | Required |
|---|---|---|
| alert_id | The ID of the alert for which to retrieve its details. | Required |
| timeout | Timeout to retrieve the artifacts. Default is 30 seconds. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| FireEyeCM.Alerts.id | String | The ID of the alert. |
| FireEyeCM.Alerts.uuid | String | The UUID of the alert. |
| FireEyeCM.Alerts.occurred | String | The time when the alert occurred. |
| FireEyeCM.Alerts.product | String | The product name of the alert. |
| FireEyeCM.Alerts.rootInfection | String | The ID of the infection associated with the malware alert. |
| FireEyeCM.Alerts.name | String | The link to the infection associated with the malware alert. |
| FireEyeCM.Alerts.vlan | String | The virtual LAN (VLAN) of the alert. |
| FireEyeCM.Alerts.malicious | String | A flag indicating whether the alert is malicious. |
| FireEyeCM.Alerts.severity | String | The severity of the alert. |
| FireEyeCM.Alerts.sensor | String | The sensor name that the alert is associated with. |
| FireEyeCM.Alerts.applianceId | String | The appliance ID of the alert. |
| FireEyeCM.Alerts.sensorIp | String | The sensor IP that the alert is associated with. |
| FireEyeCM.Alerts.ack | String | A flag indicating whether an acknowledgment is received. |
| FireEyeCM.Alerts.src | Unknown | The source of the alert. |
| FireEyeCM.Alerts.dst | Unknown | The destination of the alert. |
| FireEyeCM.Alerts.explanation | Unknown | The explanation data of the alert. |
Command Example
!fireeye-cm-get-alert-details alert_id=35685
Context Example
{
"FireEyeCM": {
"Alerts": {
"ack": "no",
"action": "notified",
"alertUrl": "https://FireEyeCM/event_stream/events_for_bot?ev_id=35685",
"applianceId": "test",
"attackTime": "2021-06-10 21:52:43 +0000",
"dst": {
"ip": "1.1.1.1",
"mac": "00:50:56:94:b8:42",
"port": 443
},
"explanation": {
"malwareDetected": {
"malware": [
{
"name": "Trojan.Malicious.SSL.Certificate.Dridex"
}
]
},
"osChanges": []
},
"id": 35685,
"malicious": "yes",
"name": "MALWARE_CALLBACK",
"occurred": "2021-06-10 21:52:43 +0000",
"product": "WEB_MPS",
"rootInfection": 34670,
"scVersion": "1163.102",
"sensor": "sensor",
"sensorIp": "1.1.1.1",
"severity": "CRIT",
"src": {
"ip": "1.1.1.1",
"port": 8080
},
"uuid": "529023c0-6ddf-4933-9241-fe4ec71a788e",
"vlan": 0
}
}
}
Human Readable Output
FireEye Central Management Alerts
id occurred product name malicious action src dst severity alertUrl 35685 2021-06-10 21:52:43 +0000 WEB_MPS MALWARE_CALLBACK yes notified ip: 34.252.247.142
port: 51270mac: 00:50:56:94:b8:42
port: 443
ip: 192.168.1.202CRIT https://FireEyeCM/event_stream/events_for_bot?ev_id=35685
fireeye-cm-alert-acknowledge
Confirms that the alert has been reviewed.
Base Command
fireeye-cm-alert-acknowledge
Input
| Argument Name | Description | Required |
|---|---|---|
| uuid | The universally unique identifier (UUID) for the alert. | Required |
Context Output
There is no context output for this command.
Command Example
!fireeye-cm-alert-acknowledge uuid=529023c0-6ddf-4933-9241-fe4ec71a788e
Human Readable Output
Alert 529023c0-6ddf-4933-9241-fe4ec71a788e was acknowledged successfully.
fireeye-cm-get-artifacts-by-uuid
Downloads malware artifacts data for the specified UUID as a zip file.
Base Command
fireeye-cm-get-artifacts-by-uuid
Input
| Argument Name | Description | Required |
|---|---|---|
| uuid | The universally unique identifier (UUID) for the alert. | Required |
| timeout | Timeout to retrieve the artifacts. Default is 120 seconds. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| InfoFile.EntryID | string | The EntryID of the artifact file. |
| InfoFile.Extension | string | The extension of the artifact file. |
| InfoFile.Name | string | The name of the artifact file. |
| InfoFile.Info | string | The info of the artifact file. |
| InfoFile.Size | number | The size of the artifact file. |
| InfoFile.Type | string | The type of the artifact file. |
Command Example
!fireeye-cm-get-artifacts-by-uuid uuid=b38b83a0-4b96-408c-999f-4e97a5099f61
Context Example
{
"InfoFile": {
"EntryID": "400@2c246757-e02c-458a-8620-dbc236283fb8",
"Extension": "zip",
"Info": "application/zip",
"Name": "artifacts_b38b83a0-4b96-408c-999f-4e97a5099f61.zip",
"Size": 5501,
"Type": "Zip archive data, at least v2.0 to extract"
}
}
Human Readable Output
fireeye-cm-get-artifacts-metadata-by-uuid
Gets artifacts metadata for the specified UUID.
Base Command
fireeye-cm-get-artifacts-metadata-by-uuid
Input
| Argument Name | Description | Required |
|---|---|---|
| uuid | The universally unique identifier (UUID) for the alert. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| FireEyeCM.Alerts.uuid | string | Universally unique ID (UUID) of the alert. |
| FireEyeCM.Alerts.artifactsInfoList.artifactType | string | The artifact type. |
| FireEyeCM.Alerts.artifactsInfoList.artifactName | string | The artifact name. |
| FireEyeCM.Alerts.artifactsInfoList.artifactSize | string | The zipped artifact size in bytes. |
Command Example
!fireeye-cm-get-artifacts-metadata-by-uuid uuid=b38b83a0-4b96-408c-999f-4e97a5099f61
Context Example
{
"FireEyeCM": {
"Alerts": {
"artifactsInfoList": [
{
"artifactName": "34.252.247.142-192.168.1.202-1620538334558058-33354739.txt.gz",
"artifactSize": "1641",
"artifactType": "l7_context_file"
},
{
"artifactName": "192.168.1.202-34.252.247.142-1620538334557811-33354739-cs.pcap",
"artifactSize": "3645",
"artifactType": "bott_communication_capture"
}
],
"uuid": "b38b83a0-4b96-408c-999f-4e97a5099f61"
}
}
}
Human Readable Output
FireEye Central Management b38b83a0-4b96-408c-999f-4e97a5099f61 Artifact metadata
artifactName artifactSize artifactType 34.252.247.142-192.168.1.202-1620538334558058-33354739.txt.gz 1641 l7_context_file 192.168.1.202-34.252.247.142-1620538334557811-33354739-cs.pcap 3645 bott_communication_capture
fireeye-cm-get-events
Retrieves information about existing IPS NX events. An IPS enabled appliance is a prerequisite to be able to retrieve IPS event data.
Base Command
fireeye-cm-get-events
Input
| Argument Name | Description | Required |
|---|---|---|
| duration | The time interval in which to search. This filter is used with the end_time filter. If the duration is not specified, the system defaults to duration=12_hours, end_time=current_time. Possible values are: 1_hour, 2_hours, 6_hours, 12_hours, 24_hours, 48_hours. | Optional |
| end_time | The end time of the search. This filter is used with the duration filter. If the end_time is specified but not the duration, the system defaults to duration=12_hours, ending at the specified end_time. Syntax: end_time=YYYY-MM-DDTHH:mm:ss.sss-OH:om. | Optional |
| mvx_correlated_only | Specifies whether to include all IPS events or MVX-correlated events only. Possible values: “true” and “false”. Possible values are: false, true. Default is false. | Optional |
| limit | Maximum number of events to return. Default is 20. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| FireEyeCM.Events.eventId | Number | The ID of the event. |
| FireEyeCM.Events.occurred | string | The date and time when the event occurred. |
| FireEyeCM.Events.srcIp | string | The IP address of the victim. |
| FireEyeCM.Events.srcPort | Number | The port address of the victim. |
| FireEyeCM.Events.dstIp | string | The IP address of the attacker. |
| FireEyeCM.Events.dstPort | Number | The port address of the attacker. |
| FireEyeCM.Events.vlan | Number | The virtual LAN (VLAN) of the event. |
| FireEyeCM.Events.signatureMatchCnt | String | The date and time when the event occurred. |
| FireEyeCM.Events.signatureId | String | The ID of the event. |
| FireEyeCM.Events.signatureRev | String | The date and time when the event occurred. |
| FireEyeCM.Events.severity | String | The ID of the event. |
| FireEyeCM.Events.vmVerified | String | The date and time when the event occurred. |
| FireEyeCM.Events.srcMac | String | The MAC address of the source machine. |
| FireEyeCM.Events.dstMac | String | The MAC address of the destination machine. |
| FireEyeCM.Events.ruleName | String | The rule name for the event. |
| FireEyeCM.Events.sensorId | String | The sensor ID of the FireEye machine. |
| FireEyeCM.Events.cveId | String | The CVE ID found in the event. |
| FireEyeCM.Events.actionTaken | String | The IPS blocking action taken on the event. |
| FireEyeCM.Events.attackMode | String | The attack mode mentioned in the event. |
| FireEyeCM.Events.interfaceId | Number | The interface ID of the event. |
| FireEyeCM.Events.protocol | Number | The protocol used in the event. |
| FireEyeCM.Events.incidentId | Number | The incident ID of the event on FireEye. |
Command Example
!fireeye-cm-get-events duration="48_hours" end_time="2021-05-14T01:08:04.000-02:00" mvx_correlated_only="true"
Human Readable Output
No events in the given timeframe were found.
fireeye-cm-get-quarantined-emails
Searches and retrieves quarantined emails.
Base Command
fireeye-cm-get-quarantined-emails
Input
| Argument Name | Description | Required |
|---|---|---|
| start_time | Specifies the start time of the search. This filter is optional. Syntax: start_time=YYYY-MM-DDTHH:mm:ss.sss-OH:om or ‘1 day/month/year’. Default is 1 day. | Optional |
| end_time | Specifies the end time of the search. Default is now. Syntax: end_time=YYYY-MM-DDTHH:mm:ss.sss-OH:om or ‘1 day/month/year’. | Optional |
| from | The sender email. | Optional |
| subject | The email subject. Must be URL encoded. | Optional |
| appliance_id | The appliance ID. | Optional |
| limit | Number of emails to return. Default is 20. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| FireEyeCM.QuarantinedEmail.appliance_id | string | The appliance ID associated with the quarantined email. |
| FireEyeCM.QuarantinedEmail.completed_at | string | The time the email has been quarantined. |
| FireEyeCM.QuarantinedEmail.email_uuid | string | The quarantined email UUID. |
| FireEyeCM.QuarantinedEmail.from | string | The quarantined email sender. |
| FireEyeCM.QuarantinedEmail.message_id | string | The quarantined email message ID. |
| FireEyeCM.QuarantinedEmail.quarantine_path | string | The quarantined email path. |
| FireEyeCM.QuarantinedEmail.The quarantined email queue id. | string | The quarantined email queue ID. |
| FireEyeCM.QuarantinedEmail.subject | string | The quarantined email subject. |
Command Example
!fireeye-cm-get-quarantined-emails start_time="1 month" limit=4
Context Example
{
"FireEyeCM": {
"QuarantinedEmail": [
{
"appliance_id": "test",
"completed_at": "2021-05-24T09:04:03",
"email_uuid": "d7738eb0-7fe7-4b5d-8fcb-2b053ef57e13",
"from": "test@malicious.net",
"message_id": "queue-id-test@no-message-id",
"quarantine_path": "/data/email-analysis/quarantine2/2021-05-24/09/test",
"queue_id": "4FpWV31wpbzTgF9",
"subject": "test"
},
{
"appliance_id": "test",
"completed_at": "2021-05-24T16:01:16",
"email_uuid": "9e73ca23-b935-47c2-8d2a-fe1a10071db2",
"from": "test@malicious.net",
"message_id": "queue-id-test@no-message-id",
"quarantine_path": "/data/email-analysis/quarantine2/2021-05-24/16/test",
"queue_id": "test",
"subject": "test"
},
{
"appliance_id": "test",
"completed_at": "2021-05-24T16:01:16",
"email_uuid": "e7b52446-555d-40d0-b8ad-e8f1f2a7ab7a",
"from": "test@malicious.net",
"message_id": "queue-id-test@no-message-id",
"quarantine_path": "/data/email-analysis/quarantine2/2021-05-24/16/test",
"queue_id": "test",
"subject": "test"
},
{
"appliance_id": "test",
"completed_at": "2021-05-24T16:01:16",
"email_uuid": "ebb991b5-06ef-44f4-b44d-e1daef67ce70",
"from": "test@malicious.net",
"message_id": "queue-id-test@no-message-id",
"quarantine_path": "/data/email-analysis/quarantine2/2021-05-24/16/test",
"queue_id": "test",
"subject": "test"
}
]
}
}
Human Readable Output
FireEye Central Management Quarantined emails
email_uuid from subject message_id completed_at d7738eb0-7fe7-4b5d-8fcb-2b053ef57e13 test@malicious.net test queue-id-test@no-message-id 2021-05-24T09:04:03 9e73ca23-b935-47c2-8d2a-fe1a10071db2 test@malicious.net test queue-id-test@no-message-id 2021-05-24T16:01:16 e7b52446-555d-40d0-b8ad-e8f1f2a7ab7a test@malicious.net test queue-id-test@no-message-id 2021-05-24T16:01:16 ebb991b5-06ef-44f4-b44d-e1daef67ce70 test@malicious.net test queue-id-test@no-message-id 2021-05-24T16:01:16
fireeye-cm-release-quarantined-emails
Releases and deletes quarantined emails. This is not available when Email Security is in Drop mode.
Base Command
fireeye-cm-release-quarantined-emails
Input
| Argument Name | Description | Required |
|---|---|---|
| queue_ids | A comma-separated list of quarantined email queue IDs. Supports up to 100 IDs. | Required |
| sensor_name | The sensor display name. | Required |
Context Output
There is no context output for this command.
fireeye-cm-delete-quarantined-emails
Deletes quarantined emails. This is not available when Email Security is in Drop mode.
Base Command
fireeye-cm-delete-quarantined-emails
Input
| Argument Name | Description | Required |
|---|---|---|
| queue_ids | A comma-separated list of quarantined email queue IDs. Supports up to 100 IDs. | Required |
| sensor_name | The sensor display name. | Required |
Context Output
There is no context output for this command.
fireeye-cm-download-quarantined-emails
Download quarantined emails.
Base Command
fireeye-cm-download-quarantined-emails
Input
| Argument Name | Description | Required |
|---|---|---|
| queue_id | The quarantined emails queue ID. | Required |
| sensor_name | The sensor display name. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| File.Name | String | The name of the email. |
| File.MD5 | String | The MD5 hash of the email. |
| File.SHA1 | String | The SHA1 hash of the email. |
| File.SHA256 | String | The SHA256 hash of the email. |
| File.Type | String | The file type. |
| File.Size | Number | The size of the email in bytes. |
| File.SSDeep | String | The SSDeep hash of the email. |
Command Example
!fireeye-cm-download-quarantined-emails sensor_name=FireEyeEX queue_id=test
Context Example
{
"File": {
"EntryID": "420@2c246757-e02c-458a-8620-dbc236283fb8",
"Extension": "eml",
"Info": "message/rfc822",
"MD5": "634996e695399dfc43488047c8316eaf",
"Name": "quarantined_email_4FpWV31wpbzTgF9.eml",
"SHA1": "5e6f89930c81da3f562eb630b4f881315bb56103",
"SHA256": "218f9c5975dc12e3e3857474669cda62df063051a46213042f5b404ae8bf138f",
"SHA512": "a7c19471fb4f2b752024246c28a37127ea7475148c04ace743392334d0ecc4762baf30b892d6a24b335e1065b254166f905fc46cc3ba5dba89e757bb7023a211",
"SSDeep": "6:tnWrw+bcnWd4jXQ93f9FfZPny8ZijRSF1OZKi1rzfSY4SXfT8oERf:tnWrwWcnWd4M9fZvy8SUF184MfPE5",
"Size": 269,
"Type": "RFC 822 mail text, ASCII text"
}
}
Human Readable Output
fireeye-cm-get-reports
Returns reports on selected alerts.
Base Command
fireeye-cm-get-reports
Input
| Argument Name | Description | Required |
|---|---|---|
| report_type | The report type. Requests for ipsTopNAttack, ipsTopNAttacker, ipsTopNVictim, or ipsTopNMvxVerified reports must be used with the limit parameter set to either 25, 50, 75, or 100. You must have an Intrusion Prevention System (IPS)-enabled appliance to be able to generate the IPS reports. Possible values are: empsEmailAVReport, empsEmailActivity, empsEmailExecutiveSummary, empsEmailHourlyStat, mpsCallBackServer, mpsExecutiveSummary, mpsInfectedHostsTrend, mpsMalwareActivity, mpsWebAVReport, ipsExecutiveSummary, ipsTopNAttack, ipsTopNAttacker, ipsTopNVictim, ipsTopNMvxVerified, alertDetailsReport. | Required |
| start_time | The start time of the search. This filter is optional. Syntax: start_time=YYYY-MM-DDTHH:mm:ss.sss-OH:om or ‘1 day/month/year’. Default is 1 week. | Optional |
| end_time | Specifies the end time of the search. Default is now. Syntax: end_time=YYYY-MM-DDTHH:mm:ss.sss-OH:om or ‘1 day/month/year’. | Optional |
| limit | The maximum number of items covered by each report. This option is required only for IPS TopN reports. Default is 100. | Optional |
| interface | The internet interface to one of the values. This option is required only for IPS reports. Possible values are: A, B, AB. | Optional |
| alert_id | Alert ID. This argument is only relevant when retrieving a report of type alertDetailsReport. | Optional |
| infection_id | Infection ID. This argument is only relevant when retrieving a report of type alertDetailsReport with conjunction to the infection_type argument. | Optional |
| infection_type | Infection type. Possible values: “malware-object”, “malware-callback”, “infection-match”, “domain-match”, “web-infection”. This argument is only relevant when retrieving a report of type alertDetailsReport with conjunction to the infection_id argument. Possible values are: malware-object, malware-callback, infection-match, domain-match, web-infection. | Optional |
| timeout | Timeout to retrieve the reports. Default is 120 seconds. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| InfoFile.EntryID | string | The EntryID of the artifact file. |
| InfoFile.Extension | string | The extension of the artifact file. |
| InfoFile.Name | string | The name of the artifact file. |
| InfoFile.Info | string | The info of the artifact file. |
| InfoFile.Size | number | The size of the artifact file. |
| InfoFile.Type | string | The type of the artifact file. |
Command Example
``````
Human Readable Output
Known Limitations
Clicking the Test button of the Integration instance settings window verifies that the instance configuration is correct.
Due to a known limitation, clicking the Test button several times in quick succession may result in an “Unauthorized” error, even after a successful result was initially returned. It is enough to receive one success message to verify that the configuration is correct. “Unauthorized” error messages received from repeated clicking of the instance configuration Test button do not affect the validity of the instance if the initial response was successful.
Configuration parameters
url— Your server URL (required)credentials— Username (required)isFetch— Fetch incidentsmax_fetch— Max incidents to fetchfirst_fetch— First fetch timestamp (<number> <time unit>, e.g., 12 hours, 7 days, 3 months, 1 year)incidentType— Incident typeincidentFetchInterval— Incidents Fetch Intervalinfo_level— Info level for fetched alertsinsecure— Trust any certificate (not secure)proxy— Use system proxy settings
Commands (11)
-
fireeye-cm-alert-acknowledgeConfirms that the alert has been reviewed.
-
fireeye-cm-delete-quarantined-emailsDeletes quarantined emails. This is not available when Email Security is in Drop mode.
-
fireeye-cm-download-quarantined-emailsDownload quarantined emails.
-
fireeye-cm-get-alert-detailsSearches and retrieves the details of a single alert.
-
fireeye-cm-get-alertsSearches and retrieves FireEye CM alerts based on several filters.
-
fireeye-cm-get-artifacts-by-uuidDownloads malware artifacts data for the specified UUID as a zip file.
-
fireeye-cm-get-artifacts-metadata-by-uuidGets artifacts metadata for the specified UUID.
-
fireeye-cm-get-eventsRetrieves information about existing IPS NX events. An IPS enabled appliance is a prerequisite to be able to retrieve IPS event data.
-
fireeye-cm-get-quarantined-emailsSearches and retrieves quarantined emails.
-
fireeye-cm-get-reportsReturns reports on selected alerts.
-
fireeye-cm-release-quarantined-emailsReleases and deletes quarantined emails. This is not available when Email Security is in Drop mode.
import urllib3 from CommonServerPython import * # Disable insecure warnings urllib3.disable_warnings() """ CONSTANTS """ INTEGRATION_NAME = "FireEye Central Management" INTEGRATION_COMMAND_NAME = "fireeye-cm" INTEGRATION_CONTEXT_NAME = "FireEyeCM" DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ" # ISO8601 format with UTC, default in XSOAR class Client: """ The integration's client """ def __init__(self, base_url: str, username: str, password: str, verify: bool, proxy: bool): self.fe_client: FireEyeClient = FireEyeClient( base_url=base_url, username=username, password=password, verify=verify, proxy=proxy ) @logger def run_test_module(client: Client) -> str: client.fe_client.get_alerts_request({"info_level": "concise"}) return "ok" @logger def get_alerts(client: Client, args: Dict[str, Any]) -> CommandResults: def parse_request_params(args: Dict[str, Any]) -> Dict: alert_id = args.get("alert_id", "") start_time = args.get("start_time", "") if start_time: start_time = to_fe_datetime_converter(start_time) end_time = args.get("end_time") if end_time: end_time = to_fe_datetime_converter(end_time) duration = args.get("duration") callback_domain = args.get("callback_domain", "") dst_ip = args.get("dst_ip", "") src_ip = args.get("src_ip", "") file_name = args.get("file_name", "") file_type = args.get("file_type", "") malware_name = args.get("malware_name", "") malware_type = args.get("malware_type", "") recipient_email = args.get("recipient_email", "") sender_email = args.get("sender_email", "") url_ = args.get("url", "") request_params = {"info_level": args.get("info_level", "concise")} if start_time: request_params["start_time"] = start_time if end_time: request_params["end_time"] = end_time if duration: request_params["duration"] = duration if alert_id: request_params["alert_id"] = alert_id if callback_domain: request_params["callback_domain"] = callback_domain if dst_ip: request_params["dst_ip"] = dst_ip if src_ip: request_params["src_ip"] = src_ip if file_name: request_params["file_name"] = file_name if file_type: request_params["file_type"] = file_type if malware_name: request_params["malware_name"] = malware_name if malware_type: request_params["malware_type"] = malware_type if recipient_email: request_params["recipient_email"] = recipient_email if sender_email: request_params["sender_email"] = sender_email if url_: request_params["url"] = url_ return request_params request_params = parse_request_params(args) limit = int(args.get("limit", "20")) timeout = int(args.get("timeout", "120")) raw_response = client.fe_client.get_alerts_request(request_params, timeout=timeout) alerts = raw_response.get("alert") if not alerts: md_ = f"No alerts with the given arguments were found.\n Arguments {request_params!s}" else: alerts = alerts[:limit] headers = ["id", "occurred", "product", "name", "malicious", "severity", "alertUrl"] md_ = tableToMarkdown(name=f"{INTEGRATION_NAME} Alerts:", t=alerts, headers=headers, removeNull=True) return CommandResults( readable_output=md_, outputs_prefix=f"{INTEGRATION_CONTEXT_NAME}.Alerts", outputs_key_field="uuid", outputs=alerts, raw_response=raw_response, ) @logger def get_alert_details(client: Client, args: Dict[str, Any]) -> List[CommandResults]: alert_ids = argToList(args.get("alert_id")) timeout = int(args.get("timeout", "120")) command_results: List[CommandResults] = [] headers = ["id", "occurred", "product", "name", "malicious", "action", "src", "dst", "severity", "alertUrl"] for alert_id in alert_ids: raw_response = client.fe_client.get_alert_details_request(alert_id, timeout) alert_details = raw_response.get("alert") if not alert_details: md_ = f"Alert {alert_id} was not found." else: md_ = tableToMarkdown(name=f"{INTEGRATION_NAME} Alerts:", t=alert_details, headers=headers, removeNull=True) command_results.append( CommandResults( readable_output=md_, outputs_prefix=f"{INTEGRATION_CONTEXT_NAME}.Alerts", outputs_key_field="uuid", outputs=alert_details, raw_response=raw_response, ) ) return command_results @logger def alert_acknowledge(client: Client, args: Dict[str, Any]) -> List[CommandResults]: uuids = argToList(args.get("uuid")) command_results: List[CommandResults] = [] for uuid in uuids: try: client.fe_client.alert_acknowledge_request(uuid) md_ = f"Alert {uuid} was acknowledged successfully." except Exception as err: if "Error in API call [404]" in str(err): md_ = f"Alert {uuid} was not found or cannot update. It may have been acknowledged in the past." else: raise command_results.append(CommandResults(readable_output=md_)) return command_results @logger def get_artifacts_by_uuid(client: Client, args: Dict[str, Any]): uuids = argToList(args.get("uuid")) timeout = int(args.get("timeout", "120")) for uuid in uuids: artifact = client.fe_client.get_artifacts_by_uuid_request(uuid, timeout) demisto.results(fileResult(f"artifacts_{uuid}.zip", data=artifact, file_type=EntryType.ENTRY_INFO_FILE)) @logger def get_artifacts_metadata_by_uuid(client: Client, args: Dict[str, Any]) -> List[CommandResults]: uuids: List[str] = argToList(str(args.get("uuid"))) command_results: List[CommandResults] = [] for uuid in uuids: raw_response = client.fe_client.get_artifacts_metadata_by_uuid_request(uuid) outputs = raw_response outputs["uuid"] = uuid # type: ignore md_ = tableToMarkdown( name=f"{INTEGRATION_NAME} {uuid} Artifact metadata:", t=raw_response.get("artifactsInfoList"), removeNull=True ) command_results.append( CommandResults( readable_output=md_, outputs_prefix=f"{INTEGRATION_CONTEXT_NAME}.Alerts", outputs_key_field="uuid", outputs=outputs, raw_response=raw_response, ) ) return command_results @logger def get_events(client: Client, args: Dict[str, Any]) -> CommandResults: duration = args.get("duration", "12_hours") end_time = to_fe_datetime_converter(args.get("end_time", "now")) mvx_correlated_only = argToBoolean(args.get("mvx_correlated_only", "false")) limit = int(args.get("limit", "20")) raw_response = client.fe_client.get_events_request(duration, end_time, mvx_correlated_only) events = raw_response.get("events") if not events: md_ = "No events in the given timeframe were found." else: events = events[:limit] headers = ["occurred", "ruleName", "severity", "malicious", "cveId", "eventId", "srcIp", "dstIp"] md_ = tableToMarkdown(name=f"{INTEGRATION_NAME} Events:", t=events, headers=headers, removeNull=True) return CommandResults( readable_output=md_, outputs_prefix=f"{INTEGRATION_CONTEXT_NAME}.Events", outputs_key_field="eventId", outputs=events, raw_response=raw_response, ) @logger def get_quarantined_emails(client: Client, args: Dict[str, Any]) -> CommandResults: start_time = to_fe_datetime_converter(args.get("start_time", "1 day")) end_time = to_fe_datetime_converter(args.get("end_time", "now")) from_ = args.get("from", "") subject = args.get("subject", "") appliance_id = args.get("appliance_id", "") limit = args.get("limit", "10000") raw_response = client.fe_client.get_quarantined_emails_request(start_time, end_time, from_, subject, appliance_id, limit) if not raw_response: md_ = "No emails with the given query arguments were found." else: headers = ["email_uuid", "from", "subject", "message_id", "completed_at"] md_ = tableToMarkdown(name=f"{INTEGRATION_NAME} Quarantined emails:", t=raw_response, headers=headers, removeNull=True) return CommandResults( readable_output=md_, outputs_prefix=f"{INTEGRATION_CONTEXT_NAME}.QuarantinedEmail", outputs_key_field="email_uuid", outputs=raw_response, raw_response=raw_response, ) @logger def release_quarantined_emails(client: Client, args: Dict[str, Any]) -> CommandResults: sensor_name = args.get("sensor_name", "") queue_ids = argToList(args.get("queue_ids", "")) raw_response = client.fe_client.release_quarantined_emails_request(queue_ids, sensor_name) if raw_response.text: # returns 200 either way. if operation is successful than resp is empty raise DemistoException(raw_response.json()) else: md_ = f"{INTEGRATION_NAME} released emails successfully." return CommandResults(readable_output=md_, raw_response="") @logger def delete_quarantined_emails(client: Client, args: Dict[str, Any]) -> CommandResults: sensor_name = args.get("sensor_name", "") queue_ids = argToList(args.get("queue_ids", "")) raw_response = client.fe_client.delete_quarantined_emails_request(queue_ids, sensor_name) if raw_response.text: # returns 200 either way. if operation is successful than resp is empty raise DemistoException(raw_response.json()) else: md_ = f"{INTEGRATION_NAME} deleted emails successfully." return CommandResults(readable_output=md_, raw_response="") @logger def download_quarantined_emails(client: Client, args: Dict[str, Any]): sensor_name = args.get("sensor_name", "") queue_id = args.get("queue_id", "") timeout = int(args.get("timeout", "120")) raw_response = client.fe_client.download_quarantined_emails_request(queue_id, timeout, sensor_name) demisto.results(fileResult(f"quarantined_email_{queue_id}.eml", data=raw_response, file_type=EntryType.FILE)) @logger def get_reports(client: Client, args: Dict[str, Any]): report_type = args.get("report_type", "") start_time = to_fe_datetime_converter(args.get("start_time", "1 week")) end_time = to_fe_datetime_converter(args.get("end_time", "now")) limit = args.get("limit", "100") interface = args.get("interface", "") alert_id = args.get("alert_id", "") infection_id = args.get("infection_id", "") infection_type = args.get("infection_type", "") timeout = int(args.get("timeout", "120")) if report_type == "alertDetailsReport": # validate arguments # can use either alert_id, or infection_type and infection_id err_str = "The alertDetailsReport can be retrieved using alert_id argument alone, or by infection_type and infection_id" if alert_id: if infection_id or infection_type: raise DemistoException(err_str) else: if not infection_id and not infection_type: raise DemistoException(err_str) try: raw_response = client.fe_client.get_reports_request( report_type, start_time, end_time, limit, interface, alert_id, infection_type, infection_id, timeout ) csv_reports = {"empsEmailAVReport", "empsEmailHourlyStat", "mpsCallBackServer", "mpsInfectedHostsTrend", "mpsWebAVReport"} prefix = "csv" if report_type in csv_reports else "pdf" demisto.results( fileResult( f"report_{report_type}_{datetime.now().timestamp()}.{prefix}", data=raw_response, file_type=EntryType.ENTRY_INFO_FILE, ) ) except Exception as err: if "WSAPI_REPORT_ALERT_NOT_FOUND" in str(err): return CommandResults(readable_output=f"Report {report_type} was not found with the given arguments.") else: raise @logger def fetch_incidents( client: Client, last_run: dict, first_fetch: str, max_fetch: int = 50, info_level: str = "concise" ) -> tuple[dict, list]: if not last_run: # if first time fetching next_run = {"time": to_fe_datetime_converter(first_fetch), "last_alert_ids": []} else: next_run = last_run demisto.info(f'{INTEGRATION_NAME} executing fetch with: {next_run.get("time")!s}') raw_response = client.fe_client.get_alerts_request( request_params={ "start_time": to_fe_datetime_converter(next_run["time"]), # type: ignore "info_level": info_level, "duration": "48_hours", } ) all_alerts = raw_response.get("alert") ten_minutes = dateparser.parse("10 minutes") assert ten_minutes is not None if not all_alerts: demisto.info(f"{INTEGRATION_NAME} no alerts were fetched from FireEye server at: {next_run!s}") # as no alerts occurred in the window of 48 hours from the given start time, update last_run window to the next # 48 hours. If it is later than now -10 minutes take the latter (to avoid missing events). next_run_time_date = dateparser.parse(str(next_run["time"])) assert next_run_time_date is not None two_days_from_last_search = next_run_time_date + timedelta(hours=48) now_minus_ten_minutes = ten_minutes.astimezone(two_days_from_last_search.tzinfo) next_search = min(two_days_from_last_search, now_minus_ten_minutes) next_run = {"time": next_search.isoformat(), "last_alert_ids": []} demisto.info(f"{INTEGRATION_NAME} setting next run to: {next_run!s}") return next_run, [] alerts = all_alerts[:max_fetch] last_alert_ids = last_run.get("last_alert_ids", []) incidents = [] for alert in alerts: alert_id = str(alert.get("id")) if alert_id not in last_alert_ids: # check that event was not fetched in the last fetch occurred_date = dateparser.parse(alert.get("occurred")) assert occurred_date is not None, f"could not parse {alert.get('occurred')}" incident = { "name": f"{INTEGRATION_NAME} Alert: {alert_id}", "occurred": occurred_date.strftime(DATE_FORMAT), "severity": alert_severity_to_dbot_score(alert.get("severity")), "rawJSON": json.dumps(alert), } incidents.append(incident) last_alert_ids.append(alert_id) if not incidents: demisto.info(f"{INTEGRATION_NAME} no new alerts were collected at: {next_run!s}.") # As no incidents were collected, we know that all the fetched alerts for 48 hours starting in the 'start_time' # already exists in our system, thus update last_run time to look for the next 48 hours. If it is later than # now -10 minutes take the latter (to avoid missing events) parsed_date = dateparser.parse(alerts[-1].get("occurred")) assert parsed_date is not None, f"could not parse {alerts[-1].get('occurred')}" two_days_from_last_incident = parsed_date + timedelta(hours=48) now_minus_ten_minutes = ten_minutes.astimezone(two_days_from_last_incident.tzinfo) next_search = min(two_days_from_last_incident, now_minus_ten_minutes) next_run["time"] = next_search.isoformat() demisto.info(f'{INTEGRATION_NAME} Setting next_run to: {next_run["time"]}') return next_run, [] # as alerts occurred till now, update last_run time accordingly to the that of latest fetched alert next_run = { "time": alerts[-1].get("occurred"), "last_alert_ids": last_alert_ids, # save the alert IDs from the last fetch } demisto.info(f"{INTEGRATION_NAME} Fetched {len(incidents)}. last fetch at: {next_run!s}") return next_run, incidents def main() -> None: params = demisto.params() username = params.get("credentials").get("identifier") password = params.get("credentials").get("password") # there is also a v1.2.0 which holds different paths and params, we support only the newest API version base_url = urljoin(params.get("url"), "/wsapis/v2.0.0/") verify = not argToBoolean(params.get("insecure", "false")) proxy = argToBoolean(params.get("proxy", "false")) # fetch params max_fetch = int(params.get("max_fetch", "50")) first_fetch = params.get("first_fetch", "3 days").strip() info_level = params.get("info_level") or "concise" command = demisto.command() args = demisto.args() LOG(f"Command being called is {command}") try: client = Client(base_url=base_url, username=username, password=password, verify=verify, proxy=proxy) commands = { f"{INTEGRATION_COMMAND_NAME}-get-alerts": get_alerts, f"{INTEGRATION_COMMAND_NAME}-get-alert-details": get_alert_details, f"{INTEGRATION_COMMAND_NAME}-alert-acknowledge": alert_acknowledge, f"{INTEGRATION_COMMAND_NAME}-get-artifacts-by-uuid": get_artifacts_by_uuid, f"{INTEGRATION_COMMAND_NAME}-get-artifacts-metadata-by-uuid": get_artifacts_metadata_by_uuid, f"{INTEGRATION_COMMAND_NAME}-get-events": get_events, f"{INTEGRATION_COMMAND_NAME}-get-quarantined-emails": get_quarantined_emails, f"{INTEGRATION_COMMAND_NAME}-release-quarantined-emails": release_quarantined_emails, f"{INTEGRATION_COMMAND_NAME}-delete-quarantined-emails": delete_quarantined_emails, f"{INTEGRATION_COMMAND_NAME}-download-quarantined-emails": download_quarantined_emails, f"{INTEGRATION_COMMAND_NAME}-get-reports": get_reports, } if command == "test-module": return_results(run_test_module(client)) elif command == "fetch-incidents": next_run, incidents = fetch_incidents( client=client, last_run=demisto.getLastRun(), first_fetch=first_fetch, max_fetch=max_fetch, info_level=info_level ) demisto.setLastRun(next_run) demisto.incidents(incidents) elif command == f"{INTEGRATION_COMMAND_NAME}-get-artifacts-by-uuid": get_artifacts_by_uuid(client, args) elif command == f"{INTEGRATION_COMMAND_NAME}-get-reports": get_reports(client, args) elif command == f"{INTEGRATION_COMMAND_NAME}-download-quarantined-emails": download_quarantined_emails(client, args) elif command in commands: return_results(commands[command](client, args)) else: raise NotImplementedError(f'Command "{command}" is not implemented.') except Exception as err: return_error(str(err), err) from FireEyeApiModule import * # noqa: E402 if __name__ in ("__main__", "__builtin__", "builtins"): main()