FalconIntel Deprecated
Deprecated. Use CrowdStrike Falcon Intel v2 integration instead.
Data Enrichment & Threat Intelligence · CrowdStrike Falcon Intel
Details
| ID | FalconIntel |
|---|---|
| Provider | CrowdStrike |
| Category | Data Enrichment & Threat Intelligence |
| From Version | 5.0.0 |
| Supported Modules | Agentix XSIAM |
README
Deprecated. Use the CrowdStrike Falcon Intelligence v2 integration instead.
This integration was integrated and tested with CrowdStrike Falcon Intel v2.
Use Cases
- Search files, URLs, domains, and IP addresses, for malware.
- Create indicator based reports.
Configure CrowdStrike Falcon Intelligence v2 on Cortex XSOAR
- Navigate to Settings > Integrations > Servers & Services.
- Search for Falcon Intel v2.
- Click Add instance to create and configure a new integration instance.
- Name: A textual name for the integration instance.
- Server URL: URL of Falcon Intel server.
- API ID
- API Key
- Threshold: Minimum malicious confidence from Falcon Intel to consider the indicator malicious (low, medium, or high). Default is high.
- Use system proxy settings
- Allow self-signed SSL certificates
- Indicator API V2
- Click Test to validate the URLs and token.
Commands
You can execute these commands from the Cortex XSOAR 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.
- Check file for malware: file
- Check URL for malware: url
- Check domain for malware: domain
- Check IP address for malware: ip
- Search for actors: cs-actors
- Indicator based report: cs-indicators
- Search summary and ID of Intelligence Reports: cs-reports
- Get report in PDF format:cs-report-pdf
1. Check file for malware
Returns malware report for specified file.
Base Command
file
Input
| Argument Name | Description |
| file | MD5, SHA-1, or SHA-256 hash of the file to check |
Context Output
| Path | Description |
| File.MD5 | Malicious MD5 hash file |
| File.SHA1 | Malicious SHA-1 hash file |
| File.SHA256 | Malicious SHA-256 hash file |
| File.Malicious.Vendor | For malicious files, the vendor that made the decision |
| File.Malicious.Description | For malicious files, the reason that the vendor made the decision |
| DBotScore.Indicator | The indicator tested |
| DBotScore.Type | Type of indicator tested |
| DBotScore.Vendor | Vendor used to calculate the score |
| DBotScore.Score | The actual score |
Command Example
!file file=369c8fc6532ba547d7ef5985bb5e880a using-brand="FalconIntel V2"
Raw Output
DBotScore
{
"Indicator":"369c8fc6532ba547d7ef5985bb5e880a",
"Score":3,
"Type":"hash",
"Vendor":"CrowdStrike"
}
File
{
"MD5":"369c8fc6532ba547d7ef5985bb5e880a",
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
}
}
Context Example
DBotScore:[] 2 items
1:{} 4 items
Indicator:369c8fc6532ba547d7ef5985bb5e880a
Score:3
Type:hash
Vendor:CrowdStrike
File:{} 2 items
MD5:369c8fc6532ba547d7ef5985bb5e880a
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
2. Check URL for malware
Returns a malware report for the specified URL.
Base Command
url
Input
| Argument Name | Description |
| url | URL to check |
Context Output
| Path | Description |
| URL.Data | Malicious URL |
| URL.Malicious.Vendor | For malicious URLs, the vendor that made the decision |
| URL.Malicious.Description | For malicious URLs, the reason that the vendor made that decision |
| DBotScore.Indicator | The indicator tested |
| DBotScore.Type | Type of indicator tested |
| DBotScore.Vendor | Vendor used to calculate the score |
| DBotScore.Score | The actual score |
Command Example
!url url="http://8.8.8.8/google.doc" using="FalconIntel V2_instance_1"
Raw Output
DBotScore
{
"Indicator":"http://8.8.8.8/google.doc",
"Score":3,
"Type":"url",
"Vendor":"CrowdStrike"
}
URL
{
"Data": "http://8.8.8.8/google.doc",
"Malicious": {
"Description": "High confidence",
"Vendor": "CrowdStrike"
}
}
Context Example
DBotScore:[] 3 items
2:{} 4 items
Indicator:http://8.8.8.8/google.doc
Score:3
Type:url
Vendor:CrowdStrike
URL:{} 2 items
Data:http://8.8.8.8/google.doc
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
3. Check Domain for malware
Returns malware report for specified domain.
Base Command
domain
Input
| Argument Name | Description |
| domain | Domain to check |
Context Output
| Path | Description |
| Domain.Name | Malicious domain |
| Domain.Malicious.Vendor | For malicious domains, the vendor that made the decision |
| Domain.Malicious.Description | For malicious domains, the reason that the vendor to made that decision |
| DBotScore.Indicator | The indicator tested |
| DBotScore.Type | Type of indicator tested |
| DBotScore.Vendor | Vendor used to calculate the score |
| DBotScore.Score | The actual score |
Command Example
!domain domain="dns02.hpupdat.net" using="FalconIntel V2_instance_1"
Raw Output
DBotScore
{
"Indicator": "dns02.hpupdat.net",
"Score": 3,
"Type": "domain",
"Vendor": "CrowdStrike"
}
Domain
{
"Malicious": {
"Description": "High confidence",
"Vendor": "CrowdStrike"
},
"Name": "dns02.hpupdat.net"
}
Context Example
DBotScore:[] 4 items
3:{} 4 items
Indicator:dns02.hpupdat.net
Score:3
Type:domain
Vendor:CrowdStrike
Domain:{} 2 items
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
Name:dns02.hpupdat.net
4. Check IP address for malware
Returns malware report for specified file.
Base Command
ip
Input
| Argument Name | Description |
| ip | IP address to check |
Context Output
| Path | Description |
| IP.Address | Malicious IP address |
| IP.Malicious.Vendor | For malicious IP addresses, the vendor that made the decision |
| IP.Malicious.Description | For malicious IP addresses, the reason that the vendor made that decision |
| DBotScore.Indicator | The indicator tested |
| DBotScore.Type | Type of indicator tested |
| DBotScore.Vendor | Vendor used to calculate the score |
| DBotScore.Score | The actual score |
Command Example
ip ip="4.4.4.4" using="FalconIntel V2_instance_1"
Raw Output
DBotScore
{
"Indicator": "4.4.4.4",
"Score": 1,
"Type": "ip",
"Vendor": "CrowdStrike"
}
Context Example
DBotScore:{} 4 items
Indicator:4.4.4.4
Score:1
Type:ip
Vendor:CrowdStrike
5. Search for actors
Searches for actors.
Base Command
cs-actors
Input
| Argument Name | Description |
| q | Search all fields for the specified data. |
| name | Search based on actor name. |
| desc | Search based on description. |
| minLastModifiedDate |
Search range starts at modified date. Dates are formatted as YYYY-MM-DD. |
| maxLastModifiedDate |
Search range ends at modified date. Dates are formatted as YYYY-MM-DD. |
| minLastActivityDate |
Search range starts at activity date. Dates are formatted as YYYY-MM-DD. |
| maxLastActivityDate |
Search range ends at activity date. Dates are formatted as YYYY-MM-DD. |
| origins | Search by comma-separated list of origins. |
| targetCountries | Search by comma-separated list of target countries. |
| targetIndustries | Search by comma-separated list of target industries. |
| motivations | Search by comma-separated list of motivations. |
| offset | Which page of the results to retrieve. It is 0 based. |
| limit | Number of results displayed in the page. |
| sort |
Sort is field_name.order, field_name.order. order is either asc or desc. |
| slug |
Search by 'slug' or short descriptive name. Example: "anchor-panda" |
Context Output
There is no context output for this command.
Command Example
!cs-actors q="google" limit="2"
Raw Output
There is no raw output for this command.
Context Example
There is no context example for this command.
6. Indicator based report
Generates a report according to specified indicators.
Base Command
cs-indicators
Input
| Argument Name | Description |
| parameter |
What parameter to search. See CrowdStrike documentation for details. <hyperlink> Valid values are:
|
| filter |
Valid values are:
|
| value | The value for the given parameter |
| sort |
Sort by a field in the format of field_name.order. order is either asc or desc. Valid values for fields are:
|
| page | The page to retrieve - 1 based |
| pageSize | The size of the page to retrieve |
Context Output
| Path | Description |
| File.MD5 | Malicious MD5 hash file |
| File.SHA1 | Malicious SHA-1 hash file |
| File.SHA256 | Malicious SHA-256 hash file |
| Malicious.Vendor | For malicious files, the vendor that made the decision |
| File.Malicious.Description | For malicious files, the reason that the vendor made that decision |
| File.Reports | For malicious files, the associated reports describing the hash |
| File.Actors | For malicious files, the associated actors |
| File.MalwareFamilies | For malicious files, the associated malware family |
| File.KillChains | For malicious files, the associated kill chain |
| URL.Data | Malicious URL |
| URL.Malicious.Vendor | For malicious URLs, the vendor that made the decision |
| URL.Malicious.Description | For malicious URLs, the reason that the vendor made that decision |
| URL.Reports | For malicious URLs, the associated reports describing the URL |
| URL.Actors | For malicious URLs, the associated actors |
| URL.MalwareFamilies | For malicious URLs, the associated malware family |
| URL.KillChains | For malicious URLs, the associated kill chain |
| Domain.Name | Malicious domain |
| Domain.Malicious.Vendor | For malicious domains, the vendor that made the decision |
| Domain.Malicious.Description | For malicious domains, the reason that the vendor made that decision |
| Domain.Reports | For malicious domains, the associated reports describing the domain |
| Domain.Actors | For malicious domains, the associated actors |
| Domain.MalwareFamilies | For malicious domains, the associated malware family |
| Domain.KillChains | For malicious domains, the associated kill chain |
| IP.Address | IP Indicators |
| IP.Malicious.Vendor | For malicious IP addresses, the vendor that made the decision |
| IP.Malicious.Description | For malicious IP addresses, the reason that the vendor made that decision |
| IP.Reports | For malicious IP addresses, the associated reports describing the IP |
| IP.Actors | For malicious IP addresses, the associated actors |
| IP.MalwareFamilies | For malicious IP addresses, the associated malware family |
| IP.KillChains | For malicious IP addresses, the associated kill chain |
| DBotScore.Indicator | The indicator tested |
| DBotScore.Type | Type of indicator tested |
| DBotScore.Vendor | Vendor used to calculate the score |
| DBotScore.Score | The actual score |
Command Example
!cs-indicators filter=match parameter=indicator value="panda"
Raw Output
DBotScore
[
{
"Indicator":"nadazpanda.publicvm.com",
"Score":3,
"Type":"domain",
"Vendor":"CrowdStrike"
},
{
"Indicator":"pandadefender.com",
"Score":3,
"Type":"domain",
"Vendor":"CrowdStrike"
},
{
"Indicator":"http://panda.tech/tw.com/panda.rtf",
"Score":3,
"Type":"url",
"Vendor":"CrowdStrike"
},
{
"Indicator":"panda1.hopto.org",
"Score":3,
"Type":"domain",
"Vendor":"CrowdStrike"
},
{
"Indicator":"http://suliparwarda.com/includes/panda.php?c=",
"Score":3,
"Type":"url",
"Vendor":"CrowdStrike"
},
{
"Indicator":"http://azmwn.suliparwarda.com/wp-content/plugins/wpdatatables/panda.php?c=",
"Score":3,
"Type":"url",
"Vendor":"CrowdStrike"
},
{
"Indicator":"balvinnew.pandabearsunited.xyz",
"Score":3,
"Type":"domain",
"Vendor":"CrowdStrike"
},
{
"Indicator":"panda3.ddns.net",
"Score":3,
"Type":"domain",
"Vendor":"CrowdStrike"
},
{
"Indicator":"panda.tech-tw.com",
"Score":2,
"Type":"domain",
"Vendor":"CrowdStrike"
},
{
"Indicator":"http://panda.tech-tw.com/panda.rtf",
"Score":3,
"Type":"url",
"Vendor":"CrowdStrike"
}
]
Domain
[
{
"KillChains":[
"C2"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
},
"MalwareFamilies":[
"njRAT"
],
"Name":"nadazpanda.publicvm.com"
},
{
"Actors":[
"FANCYBEAR"
],
"KillChains":[
"C2"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
},
"MalwareFamilies":[
"X-Agent"
],
"Name":"pandadefender.com",
"Reports":[
"CSIR-17010"
]
},
{
"KillChains":[
"C2"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
},
"MalwareFamilies":[
"CybergateRAT"
],
"Name":"panda1.hopto.org"
},
{
"KillChains":[
"C2"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
},
"MalwareFamilies":[
"XtremeRAT"
],
"Name":"balvinnew.pandabearsunited.xyz"
},
{
"KillChains":[
"C2"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
},
"MalwareFamilies":[
"njRAT"
],
"Name":"panda3.ddns.net"
},
{
"KillChains":[
"Delivery"
],
"Name":"panda.tech-tw.com"
}
]
URL
[
{
"Data":"http://panda.tech/tw.com/panda.rtf",
"KillChains":[
"Delivery"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
}
},
{
"Actors":[
"STATICKITTEN"
],
"Data":"http://suliparwarda.com/includes/panda.php?c=",
"KillChains":[
"C2"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
},
"MalwareFamilies":[
"NTSTATS"
],
"Reports":[
"CSIR-18002"
]
},
{
"Actors":[
"STATICKITTEN"
],
"Data":"http://azmwn.suliparwarda.com/wp-content/plugins/wpdatatables/panda.php?c=",
"KillChains":[
"C2"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
},
"MalwareFamilies":[
"NTSTATS"
],
"Reports":[
"CSIR-18002"
]
},
{
"Data":"http://panda.tech-tw.com/panda.rtf",
"KillChains":[
"Delivery"
],
"Malicious":{
"Description":"High confidence",
"Vendor":"CrowdStrike"
}
}
]
Context Example
DBotScore:[] 10 items
0:{} 4 items
Indicator:nadazpanda.publicvm.com
Score:3
Type:domain
Vendor:CrowdStrike
1:{} 4 items
Indicator:pandadefender.com
Score:3
Type:domain
Vendor:CrowdStrike
2:{} 4 items
Indicator:http://panda.tech/tw.com/panda.rtf
Score:3
Type:url
Vendor:CrowdStrike
3:{} 4 items
Indicator:panda1.hopto.org
Score:3
Type:domain
Vendor:CrowdStrike
4:{} 4 items
Indicator:http://suliparwarda.com/includes/panda.php?c=
Score:3
Type:url
Vendor:CrowdStrike
5:{} 4 items
Indicator:http://azmwn.suliparwarda.com/wp-content/plugins/wpdatatables/panda.php?c=
Score:3
Type:url
Vendor:CrowdStrike
6:{} 4 items
Indicator:balvinnew.pandabearsunited.xyz
Score:3
Type:domain
Vendor:CrowdStrike
7:{} 4 items
Indicator:panda3.ddns.net
Score:3
Type:domain
Vendor:CrowdStrike
8:{} 4 items
Indicator:panda.tech-tw.com
Score:2
Type:domain
Vendor:CrowdStrike
9:{} 4 items
Indicator:http://panda.tech-tw.com/panda.rtf
Score:3
Type:url
Vendor:CrowdStrike
Domain:[] 6 items
0:{} 4 items
KillChains:[] 1 item
0:C2
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
MalwareFamilies:[] 1 item
0:njRAT
Name:nadazpanda.publicvm.com
1:{} 6 items
Actors:[] 1 item
0:FANCYBEAR
KillChains:[] 1 item
0:C2
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
MalwareFamilies:[] 1 item
0:X-Agent
Name:pandadefender.com
Reports:[] 1 item
0:CSIR-17010
2:{} 4 items
KillChains:[] 1 item
0:C2
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
MalwareFamilies:[] 1 item
0:CybergateRAT
Name:panda1.hopto.org
3:{} 4 items
KillChains:[] 1 item
0:C2
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
MalwareFamilies:[] 1 item
0:XtremeRAT
Name:balvinnew.pandabearsunited.xyz
4:{} 4 items
KillChains:[] 1 item
0:C2
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
MalwareFamilies:[] 1 item
0:njRAT
Name:panda3.ddns.net
5:{} 2 items
KillChains:[] 1 item
0:Delivery
Name:panda.tech-tw.com
URL:[] 4 items
0:{} 3 items
Data:http://panda.tech/tw.com/panda.rtf
KillChains:[] 1 item
0:Delivery
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
1:{} 6 items
Actors:[] 1 item
0:STATICKITTEN
Data:http://suliparwarda.com/includes/panda.php?c=
KillChains:[] 1 item
0:C2
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
MalwareFamilies:[] 1 item
0:NTSTATS
Reports:[] 1 item
0:CSIR-18002
2:{} 6 items
Actors:[] 1 item
0:STATICKITTEN
Data:http://azmwn.suliparwarda.com/wp-content/plugins/wpdatatables/panda.php?c=
KillChains:[] 1 item
0:C2
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
MalwareFamilies:[] 1 item
0:NTSTATS
Reports:[] 1 item
0:CSIR-18002
3:{} 3 items
Data:http://panda.tech-tw.com/panda.rtf
KillChains:[] 1 item
0:Delivery
Malicious:{} 2 items
Description:High confidence
Vendor:CrowdStrike
7. Search summary and ID of Intelligence Reports
Searches for summary and ID of Intelligence Reports.
Base Command
cs-reports
Input
| Argument Name | Description |
| q | Performs a generic substring search across all fields in a report. |
| name | Search for keywords across report names (for example, the report’s title). |
| actor |
Search for a report related to a specified actor. For a list of actors, refer to the Intel Actors API. <hyperlink> |
| targetCountries | Search reports by targeted country or countries. |
| targetIndustries | Search reports by targeted industry or industries. |
| motivations | Search reports by motivation. |
| slug | Search reports by report 'slug' or short descriptive name. |
| description | Search the body of the report. |
| type | The type of object to search for. |
| subType | The sub-type of object to search for. |
| tags | Tags associated with a report (managed internally by CrowdStrike). |
| minLastModifiedDate |
Search range starts at modified date. Dates are formatted as YYYY-MM-DD. |
| maxLastModifiedDate |
Search range ends at modified date. Dates are formatted as YYYY-MM-DD. |
| offset |
Used to number the responses. You can then use limit to set the number of results for the next page. |
| limit | Limits the number of results to return |
| sort |
The field and direction to sort results on in the format of: . or .. Valid values are:
|
Context Output
There is no context output.
Command Example
!cs-reports actor=panda limit=10
Raw Output
There is no raw output.
Context Example
There is no context example.
8. Get report in PDF format
Returns a full summary of a specified report in PDF format.
Base Command
cs-report-pdf
Input
| Argument Name | Description |
| id | The ID of the report to return |
Context Output
There is no context output for this command.
Command Example
!cs-report-pdf id=588
Raw Output
There is no raw output for this command.
Context Example
There is no context example for this command.
Configuration parameters
url— Server URL (e.g. https://192.168.0.1) (required)id— API ID (required)key— API Key (required)threshold— Indicator Threshold. Minimum malicious confidence from Falcon Intel to consider the indicator malicious.(low, medium, high)useproxy— Use system proxy settingsinsecure— Trust any certificate (not secure)version— Support indicator API V2
Commands (8)
-
cs-actorsSearch known actors based on the given parameters. Dates are formatted as YYYY-MM-DD. Max date is taken automatically looking at end-of-day time. Origins, targetCountries, targetIndustries and motivations can all receive multiple values separated by ",". Offset is 0 based. Sort is field_name.order, field_name.order where order is either asc or desc.
-
cs-indicatorsSearch known indicators based on the given parameters
-
cs-report-pdfRetrieve the Falcon Intel Report PDF
-
cs-reportsThe Falcon Intel Reports API allows to query CrowdStrike intelligence publications.
-
domainCheck the given URL reputation
-
fileCheck file reputation
-
ipCheck IP reputation
-
urlCheck the given URL reputation
// determine api version for api calls var VERSION = (params.VERSION ? "v2" : "v1"); var SERVER = params.url; if (SERVER[SERVER.length - 1] !== '/') { SERVER += '/'; } var THRESHOLD = params.threshold; if (!THRESHOLD){ THRESHOLD = 'high'; } if (['low', 'medium', 'high'].indexOf(THRESHOLD) < 0) { throw('Threshold parameter must be one of: high, medium, low'); } var MALICIOUS_DICTIONARY = { 'low': 1, 'medium':2, 'high': 3 }; var MALICOUS_THRESHOLD = MALICIOUS_DICTIONARY[THRESHOLD]; function doReq(method, path, query, body) { var result = http( SERVER + path + encodeToURLQuery(query), { Headers: { 'X-CSIX-CUSTID': [params.id], 'X-CSIX-CUSTKEY': [params.key], 'Content-Type': ['application/json'], 'Accept': ['application/json'], 'X-INTEGRATION' : ['Demisto_demisto_3.6'] }, Method: method, Body: body ? JSON.stringify(body) : '' }, params.insecure, params.useproxy ); if (result.StatusCode < 200 || result.StatusCode > 299) { throw 'Failed to perform request ' + path + ', request status code: ' + result.StatusCode + ', body: ' + result.Body; } if (result.Body === '') { throw 'No content received.'; } var obj; try { obj = JSON.parse(result.Body); } catch (ex) { throw 'Error parsing reply - ' + result.Body + ' - ' + ex; } if (obj.errors && obj.errors.length > 0) { throw JSON.stringify(obj.errors); } return { body: result.Body, obj: obj, statusCode: result.StatusCode }; } function dateToEpoch(d) { if (d) { var epoch = String(new Date(d).getTime()); var trimmedEpoch = epoch.substring(0, epoch.length - 3); return trimmedEpoch; } else { return null; } } function add(a, k, ok, f) { if (args[k]) { var parts = args[k].split(','); for (var i=0; i<parts.length; i++) { parts[i] = parts[i].trim(); } a[ok ? ok : k] = f ? f(args[k]) : parts.length > 1 ? parts : args[k]; } } function simpleValue(o, t) { return o ? '- ' + t + ': ' + o.map(function(curr) {return curr.value;}).join(', ') + '\n' : ''; } // Not passing the arguments because there are a lot of them function doActors() { var a = {}; add(a, 'q'); add(a, 'name'); add(a, 'desc'); add(a, 'origins'); add(a, 'targetContries', 'target_countries'); add(a, 'targetIndustries', 'target_industries'); add(a, 'motivations'); add(a, 'slug'); add(a, 'offset'); add(a, 'limit'); add(a, 'sort'); add(a, 'minLastModifiedDate', 'min_last_modified_date', dateToEpoch); add(a, 'maxLastModifiedDate', 'max_last_modified_date', dateToEpoch); add(a, 'minLastActivityDate', 'min_last_activity_date', dateToEpoch); add(a, 'maxLastActivityDate', 'max_last_activity_date', dateToEpoch); var res = doReq('GET', 'actors/queries/actors/v1', a); var md = '## Falcon Intel Actor search\n'; if (res.obj.resources) { // Now need to retrieve the full data for each id var fullArgs = {ids: res.obj.resources, fields: '__full__'}; var resFull = doReq('GET', 'actors/entities/actors/v1', fullArgs); // Restore original pagination resFull.obj.meta.pagination = res.obj.meta.pagination; res = resFull; if (res.obj.resources) { var o = res.obj.resources; for (var i=0; i<o.length; i++) { /*if (o[i].image && o[i].image.url) { md += '![' + o[i].name +'](' + o[i].image.url + ' "' + o[i].name + '")\n'; }*/ md += '### ' + o[i].name + '\n'; md += '- ID: [' + o[i].id + '](' + o[i].url + ')\n'; md += '- Slug: ' + o[i].slug + '\n'; md += '- Description: ' + o[i].short_description + '\n'; md += '- First/Last activity: ' + new Date(o[i].first_activity_date * 1000) + ' / ' + new Date(o[i].last_activity_date * 1000) + '\n'; md += '- Active: ' + nvl(o[i].active) + '\n'; md += '- Known as: ' + nvl(o[i].known_as) + '\n'; md += simpleValue(o[i].target_industries, 'Target industries'); md += simpleValue(o[i].target_countries, 'Target countries'); md += simpleValue(o[i].origins, 'Origins'); md += simpleValue(o[i].motivations, 'Motivations'); md += '- Capability: ' + (o[i].capability ? o[i].capability.value : 'Unknown') + '\n'; md += '- Group: ' + (o[i].group ? o[i].group.value : 'Unknown') + '\n'; md += '- Region: ' + (o[i].region ? o[i].region.value : 'Unknown') + '\n'; if (o[i].kill_chain) { md += '#### Kill chain\n'; var kkeys = Object.keys(o[i].kill_chain); for (var j=0; j<kkeys.length; j++) { if (kkeys[j].indexOf('rich_text') === 0) { continue; } md += '- ' + kkeys[j] + ': ' + o[i].kill_chain[kkeys[j]] + '\n'; } } md += '\n'; } } else { md = 'No result found'; } } else { md = 'No result found'; } return { Type: entryTypes.note, Contents: res.body, ContentsFormat: formats.json, HumanReadable: md }; } function indicatorToMd(o) { var md = ''; if (o) { md += '### ' + o.indicator + '\n'; md += '- Type: ' + nvl(o.type) + '\n'; md += '- Last update: ' + nvl(o.last_update) + '\n'; md += '- Publish date: ' + nvl(o.publish_date) + '\n'; md += '- Malicious confidence: ' + nvl(o.malicious_confidence) + '\n'; if (o.reports) { md += '- Reports: ' + o.reports.join(', ') + '\n'; } if (o.actors) { md += '- Actors: ' + o.actors.join(', ') + '\n'; } if (o.malware_families) { md += '- Malware families: ' + o.malware_families.join(', ') + '\n'; } if (o.kill_chains) { md += '- Kill chains: ' + o.kill_chains.join(', ') + '\n'; } if (o.domain_types) { md += '- Domain types: ' + o.domain_types.join(', ') + '\n'; } if (o.ip_address_types) { md += '- IP Address types: ' + o.ip_address_types.join(', ') + '\n'; } if (o.relations) { md += '#### Relations\n'; md += arrToMd(o.relations) + '\n'; } if (o.labels) { md += '#### Labels\n'; md += arrToMd(o.labels) + '\n'; } } return md; } function addIndicatorToContext(t, v, score, ec, path) { var n = {properties_to_append: ['Malicious', 'Reports', 'Actors', 'MalwareFamilies', 'KillChains']}; n[t] = v.indicator; if (v.reports && v.reports.length > 0) { n.Reports = v.reports; } if (v.actors && v.actors.length > 0) { n.Actors = v.actors; } if (v.malware_families && v.malware_families.length > 0) { n.MalwareFamilies = v.malware_families; } if (v.kill_chains && v.kill_chains.length > 0) { n.KillChains = v.kill_chains; } if (score === 3) { n.Malicious = {Vendor: 'FalconIntel', Description: 'High confidence'}; } if (!ec[path]) { ec[path] = []; } ec[path].push(n); } // Not passing the arguments because there are a lot of them function doIndicators() { var a = {}; a[args.filter] = args.value; add(a, 'page'); add(a, 'pageSize'); if (args.sort) { var parts = args.sort.split('.'); a.sort = parts[0]; if (parts.length > 1) { a.order = parts[1]; } } var res = doReq('GET', 'indicator/'+ VERSION +'/search/' + args.parameter, a); var md = '## Falcon Intel Indicator Search for: ' + args.value + '\n'; var found = false; var ec = {}; if (res.obj) { for (var i=0; i<res.obj.length; i++) { md += indicatorToMd(res.obj[i]); var dbotScore = 0; var malicious_confidence = MALICIOUS_DICTIONARY[res.obj[i].malicious_confidence]; if (malicious_confidence === 3 || MALICOUS_THRESHOLD === 1) { dbotScore = 3; } else if (malicious_confidence === 2 || MALICOUS_THRESHOLD === 2) { dbotScore = 2; } else { dbotScore = 1; } var dbotType = ''; if (res.obj[i].type === 'hash_md5') { addIndicatorToContext('MD5', res.obj[i], dbotScore, ec, outputPaths.file); dbotType = 'hash'; } else if (res.obj[i].type === 'hash_sha1') { addIndicatorToContext('SHA1', res.obj[i], dbotScore, ec, outputPaths.file); dbotType = 'hash'; } else if (res.obj[i].type === 'hash_sha256') { addIndicatorToContext('SHA256', res.obj[i], dbotScore, ec, outputPaths.file); dbotType = 'hash'; } else if (res.obj[i].type === 'ip_address') { addIndicatorToContext('Address', res.obj[i], dbotScore, ec, outputPaths.ip); dbotType = 'ip'; } else if (res.obj[i].type === 'url') { addIndicatorToContext('Data', res.obj[i], dbotScore, ec, outputPaths.url); dbotType = 'url'; } else if (res.obj[i].type === 'domain') { addIndicatorToContext('Name', res.obj[i], dbotScore, ec, outputPaths.domain); dbotType = 'domain'; } if (dbotType) { if (!ec.DBotScore) { ec.DBotScore = []; } if (dbotType === 'hash'){ ec.DBotScore.push(dbotTypeHashList(res.obj[i].indicator, dbotScore)); } else { ec.DBotScore.push({ Indicator: res.obj[i].indicator, Type: dbotType, Vendor: 'FalconIntel', Score: dbotScore }); } } found = true; } } if (!found) { md += 'No result found'; } return { Type: entryTypes.note, Contents: res.body, ContentsFormat: formats.json, IgnoreAutoExtract: true, HumanReadable: md, EntryContext: ec }; } function doIndicator(ind, type, title, appendContextFunc) { var a = {'indicator.equal': ind}; if (type === 'hash') { if (!ind || ind.length === 0) { ind = ''; } var hashType = ''; switch (ind.length) { case 32: hashType = 'hash_md5'; break; case 40: hashType = 'hash_sha1'; break; case 64: hashType = 'hash_sha256'; break; default: throw 'Invalid hash. Hash length is: ' + ind.length + '. Please provide either MD5 (32 length), SHA1 (40 length), or SHA256 (64 length) hash.'; } a['type.equal'] = hashType; } else if (type == 'ip') { a['type.equal'] = 'ip_address'; } else { a['type.equal'] = type; } var res = doReq('GET', 'indicator/'+ VERSION +'/search', a); var md = '## ' + title + ': ' + ind + '\n'; var ec = {}; var found = false; if (res.obj) { for (var i=0; i<res.obj.length; i++) { md += indicatorToMd(res.obj[i]); var dbotScore = 0; var malicious_confidence = MALICIOUS_DICTIONARY[res.obj[i].malicious_confidence]; if (malicious_confidence === 3 || MALICOUS_THRESHOLD === 1) { dbotScore = 3; } else if (malicious_confidence === 2 || MALICOUS_THRESHOLD === 2) { dbotScore = 2; } else { dbotScore = 1; } if (type === 'hash') { ec.DBotScore = dbotTypeHashList(ind, dbotScore) } else { ec.DBotScore = { Indicator: ind, Type: type, Vendor: 'FalconIntel', Score: dbotScore } } found = true; } } if (!found) { md += 'No result found'; if (type === 'hash') { ec.DBotScore = dbotTypeHashList(ind, 0) } else { ec.DBotScore = { Indicator: ind, Type: type, Vendor: 'FalconIntel', Score: 0}; } } return { Type: entryTypes.note, Contents: res.body, ContentsFormat: formats.json, IgnoreAutoExtract: true, HumanReadable: md, EntryContext: ec }; } function dbotTypeHashList(ind, score){ return [{ Indicator: ind, Type: 'hash', Vendor: 'FalconIntel', Score: score }, { Indicator: ind, Type: 'file', Vendor: 'FalconIntel', Score: score } ] } function doFile(hash) { return doIndicator(hash, 'hash', 'Falcon Intel file reputation for', function(ec) { var malFile = {Malicious: {Vendor: 'FalconIntel', Description: 'High confidence'}}; var hashType = hash.length === 32 ? 'MD5' : hash.length === 40 ? 'SHA1' : 'SHA256'; malFile[hashType] = hash; addMalicious(ec, outputPaths.file, malFile); }); } function doIP(ip) { return doIndicator(ip, 'ip', 'Falcon Intel IP reputation for', function(ec) { addMalicious(ec, outputPaths.ip, {Address: ip, Malicious: {Vendor: 'FalconIntel', Description: 'High confidence'}}); }); } function doURL(url) { return doIndicator(url, 'url', 'Falcon Intel URL reputation for', function(ec) { addMalicious(ec, outputPaths.url, {Data: url, Malicious: {Vendor: 'FalconIntel', Description: 'High confidence'}}); }); } function doDomain(domain) { return doIndicator(domain, 'domain', 'Falcon Intel domain reputation for', function(ec) { addMalicious(ec, outputPaths.domain, {Name: domain, Malicious: {Vendor: 'FalconIntel', Description: 'High confidence'}}); }); } function doReports() { var a = {}; add(a, 'q'); add(a, 'name'); add(a, 'actor'); add(a, 'targetContries', 'target_countries'); add(a, 'targetIndustries', 'target_industries'); add(a, 'motivations'); add(a, 'slug'); add(a, 'description'); add(a, 'type'); add(a, 'subType', 'sub_type'); add(a, 'tags'); add(a, 'offset'); add(a, 'limit'); add(a, 'sort'); add(a, 'minLastModifiedDate', 'min_last_modified_date', dateToEpoch); add(a, 'maxLastModifiedDate', 'max_last_modified_date', dateToEpoch); var res = doReq('GET', 'reports/queries/reports/v1', a); var md = ''; if (res.obj.resources && Object.keys(res.obj.resources).length > 0) { // Now need to retrieve the full data for each id var resFull = doReq('GET', '/reports/entities/reports/v1', {ids: res.obj.resources}); // Restore original pagination resFull.obj.meta.pagination = res.obj.meta.pagination; res = resFull; if (res.obj.resources) { var o = res.obj.resources; for (var i=0; i<o.length; i++) { md += 'ID: [' + o[i].id + '](' + o[i].url + ')\n'; md += 'Name: ' + o[i].name + '\n'; md += 'Type: ' + o[i].type.name + '\n'; md += 'Sub type: ' + o[i].sub_type.name + '\n'; md += 'Slug: ' + o[i].slug + '\n'; md += 'Created: ' + new Date(o[i].created_date * 1000) + '\n'; md += 'Last modified: ' + new Date(o[i].last_modified_date * 1000) + '\n'; md += 'Description: ' + o[i].short_description + '\n'; if (o[i].target_industries) { md += 'Target industries: ' + o[i].target_industries.map(function(curr) {return curr.value;}).join(', ') + '\n'; } if (o[i].target_countries) { md += 'Target countries: ' + o[i].target_countries.map(function(curr) {return curr.value;}).join(', ') + '\n'; } if (o[i].motivations) { md += 'Motivations: ' + o[i].motivations.map(function(curr) {return curr.value;}).join(', ') + '\n'; } if (o[i].tags) { md += 'Tags: ' + o[i].tags.map(function(curr) {return curr.value;}).join(', ') + '\n'; } } } else { md = 'No result found'; } } else { md = 'No result found'; } return { Type: entryTypes.note, Contents: res.body, ContentsFormat: formats.json, HumanReadable: md }; } function doReport() { var result = http( SERVER + 'reports/entities/report-files/v1' + encodeToURLQuery({ids: args.id}), { Headers: { 'X-CSIX-CUSTID': [params.id], 'X-CSIX-CUSTKEY': [params.key], 'Accept': ['application/pdf'] }, Method: 'GET', SaveToFile: true }, params.insecure, params.useproxy ); if (result.StatusCode < 200 || result.StatusCode > 299) { throw 'Failed to retrieve PDF, status code: ' + result.StatusCode + ', body: ' + result.Body; } // Try to extract the filename var disposition = result.Headers['Content-Disposition']; var filename = 'report-' + args.id + '.pdf'; if (disposition) { disposition = disposition[0]; if (disposition) { var parts = disposition.split(';'); if (parts && parts.length > 1) { var name = parts[1].split('='); if (name && name.length > 1) { filename = name[1].trim(); } } } } return { Type: entryTypes.entryInfoFile, FileID: result.Path, File: filename, Contents: filename }; } switch (command) { case 'test-module': if(VERSION === 'v2') { doReq('GET', 'indicator/'+ VERSION +'/search/indicator', {equal: '4.4.4.4'}); return true; } else { doReq('GET', 'actors/queries/actors/v1', {q: 'panda'}); return true; } break; case 'file': return doFile(args.file); case 'ip': return doIP(args.ip); case 'url': return doURL(args.url); case 'domain': return doDomain(args.domain); case 'cs-actors': return doActors(); case 'cs-indicators': return doIndicators(); case 'cs-reports': return doReports(); case 'cs-report-pdf': return doReport(); default: throw 'Unknown command - ' + command; }