AutoFocus Feed Deprecated
Deprecated. Use Unit 42 Feed integration instead.
Data Enrichment & Threat Intelligence · AutoFocus by Palo Alto Networks · Feed
Details
| ID | AutoFocus Feed |
|---|---|
| Provider | Palo Alto Networks |
| Category | Data Enrichment & Threat Intelligence |
| From Version | 5.5.0 |
| Docker Image | demisto/python3:3.12.8.3296088 |
| Supported Modules | Agentix Cortex Cloud Cloud Runtime Security Cloud Posture Security XSIAM EDR |
README
Use the AutoFocus Feeds integration to fetch indicators from AutoFocus.
For more information click here.
This Feed supports the AutoFocus Custom Feed and the AutoFocus Samples Feed.
TIM customers that upgraded to version 6.2 or above, can have the API Key pre-configured in their main account so no additional input is needed. To use this feature, upgrade your license so it includes the license key.
Note: The Daily Threat Feed option is deprecated. No available replacement.
Configure AutoFocus Feed in Cortex
| Parameter | Description | Required |
|---|---|---|
| feed | The fetch indicators. | False |
| indicator_feeds | The indicator feed. Choose the requested indicator feeds. The Custom Feeds and Samples Feed. | True |
| api_key | API Key. | False |
| custom_feed_urls | The URL for the custom feed to fetch. This applies only in cases where a Custom Feed is requested. | False |
| scope_type | The scope of the samples to be fetched. | False |
| sample_query | The query that will be used to fetch the samples. | False |
| feedReputation | The indicator reputation. | False |
| feedReliability | The source’s reliability. | True |
| tlp_color | The Traffic Light Protocol (TLP) designation to apply to indicators fetched from the feed. More information about the protocol can be found at https://us-cert.cisa.gov/tlp | False |
| feedExpirationPolicy | The feed’s expiration policy. | False |
| feedExpirationInterval | The interval after which the feed expires. | False |
| feedFetchInterval | The feed fetch interval. | False |
| feedBypassExclusionList | Whether to bypass exclusion list. | False |
| override_default_credentials | Override default credentials | False |
| insecure | Whether to trust any certificate (not secure). | False |
| proxy | Whether to use the system proxy settings. | False |
Custom Feed info
To connect a custom AutoFocus feed you need to provide the Custom Feed URL.
The Custom Feed URL should be in this form:
https://autofocus.paloaltonetworks.com/IOCFeed/{Output_Feed_ID}/{Output_Feed_Name}
Samples Feed info
To connect a samples AutoFocus feed you need to provide the scope of the samples and the query for the samples.
- The scope can be either:
- public - Samples available for all organizations.
- private - Your own samples.
- global - Both public and private samples.
- The samples query - is the query to be used to fetch the samples from AutoFocus.
You can go to AutoFocus UI -> Search -> Sample -> Advanced -> Create your desired query -> API -> copy the query.
For example: { "operator": "all", "children": [ { "field": "sample.create_date", "operator": "is after", "value": [ "30 days ago", "30 days ago" ] } ] }
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.
Get Indicators
Gets the indicators from AutoFocus.
Note: This command does not create indicators within Cortex XSOAR.
Base Command
autofocus-get-indicators
Input
| Argument Name | Description | Required |
|---|---|---|
| limit | The maximum number of indicators to return. The default value is 10. | Optional |
| offset | The index of the first indicator to fetch. | Optional |
Context Output
There is no context output for this command.
Command Example
!autofocus-get-indicators limit=4
Human Readable Output
Indicators from AutoFocus
| Value | Type |
|---|---|
| XSOAR<Span>.com | Domain |
| {file hash} | File |
| 8.8.8.8 | IP |
| demsito<Span>.com/some/aditional/path | URL |
To bring the next batch of indicators run:
!autofocus-get-indicators limit=4 offset=4
Demo Video
Sorry, your browser doesn't support embedded videos. You can download the video at: https://github.com/demisto/content-assets/raw/7fd9e45c4d809dc1a41521c66828733dafe82148/Assets/FeedAutofocus/AutoFocus_Feed_demo.mp4Note: The video instructs users to click the _API link to get the JSON query of the Autofocus Samples Search. An easier option to get the JSON query is available via the Export Search button.
Configuration parameters
feed— Fetch indicatorsindicator_feeds— Indicator Feed (required)credentials—api_key— API Keycustom_feed_urls— The URL for the custom feed to fetchscope_type— Samples Feed Scope Typesample_query— Samples Feed QueryfeedReputation— Indicator ReputationfeedReliability— Source Reliability (required)tlp_color— Traffic Light Protocol ColorfeedExpirationPolicy—feedExpirationInterval—feedFetchInterval— Feed Fetch IntervalfeedBypassExclusionList— Bypass exclusion listinsecure— Trust any certificate (not secure)proxy— Use system proxy settingsfeedTags— Tags
Commands (1)
-
autofocus-get-indicatorsGets the indicators from AutoFocus.
import pytest from FeedAutofocus import Client, fetch_indicators_command, get_indicators_command from CommonServerPython import * INDICATORS = [ "d4da1b2d5554587136f2bcbdf0a6a1e29ab83f1d64a4b2049f9787479ad02fad", "19.117.63.253", "19.117.63.253:8080", "domaintools.com", "flake8.pycqa.org/en/latest", "19.117.63.253/28", "2001:db8:85a3:8d3:1319:8a2e:370:7348", "2001:db8:85a3:8d3:1319:8a2e:370:7348/32", "19.117.63.253:28/other/path", ] TYPES = ["File", "IP", "IP", "Domain", "URL", "CIDR", "IPv6", "IPv6CIDR", "URL"] @pytest.fixture() def auto_focus_client(): return Client(api_key="a", insecure=False, proxy=None, indicator_feeds=["Daily Threat Feed"]) def test_url_format(auto_focus_client): url1 = "https://autofocus.paloaltonetworks.com/IOCFeed/{ID}/{Name}" url2 = "autofocus.paloaltonetworks.com/IOCFeed/{ID2}/{Name2}" assert auto_focus_client.url_format(url1) == "https://autofocus.paloaltonetworks.com/api/v1.0/IOCFeed/{ID}/{Name}" assert auto_focus_client.url_format(url2) == "https://autofocus.paloaltonetworks.com/api/v1.0/IOCFeed/{ID2}/{Name2}" @pytest.mark.parametrize("tlp_color", ["", None, "AMBER"]) def test_feed_tags_param(mocker, auto_focus_client, tlp_color): """Unit test Given - fetch indicators command - command args - command raw response - tlp_color When - mock the feed tags param. - mock the Client's daily_http_request. Then - run the fetch incidents command using the Client Validate The value of the tags field. Validate the value of trafficlightprotocol incident field. """ mocker.patch.object(auto_focus_client, "daily_custom_http_request", return_value=INDICATORS) indicators = fetch_indicators_command(auto_focus_client, ["test_tag"], tlp_color) assert indicators[0].get("fields").get("tags") == ["test_tag"] if tlp_color: assert indicators[0].get("fields").get("trafficlightprotocol") == tlp_color else: assert not indicators[0].get("fields").get("trafficlightprotocol") INDICATORS_CLASSIFICATION_DATA = [ ("1.1.1.1/path", FeedIndicatorType.URL), ("1.1.1.1:8080", FeedIndicatorType.IP), ("19.117.63.253:28/other/path", FeedIndicatorType.URL), ("19.117.63.253:28/path", FeedIndicatorType.URL), ("1.1.1.1/7", FeedIndicatorType.CIDR), ("1.1.1.1/7/server/somestring/something.php?fjjasjkfhsjasofds=sjhfhdsfhasld", FeedIndicatorType.URL), ("1.1.1.1/7/server", FeedIndicatorType.URL), ("d4da1b2d5554587136f2bcbdf0a6a1e29ab83f1d64a4b2049f9787479ad02fad", FeedIndicatorType.File), ("domaintools.com", FeedIndicatorType.Domain), ("test.test.com", FeedIndicatorType.Domain), ("flake8.pycqa.org/en/latest", FeedIndicatorType.URL), ( "19.117.63.253/28", FeedIndicatorType.CIDR, ), ("2001:db8:85a3:8d3:1319:8a2e:370:7348", FeedIndicatorType.IPv6), ("2001:db8:85a3:8d3:1319:8a2e:370:7348/path/path", FeedIndicatorType.URL), ("2001:db8:85a3:8d3:1319:8a2e:370:7348/32", FeedIndicatorType.IPv6CIDR), ("2001:db8:85a3:8d3:1319:8a2e:370:7348/path", FeedIndicatorType.URL), ("2001:db8:85a3:8d3:1319:8a2e:370:7348/32/path", FeedIndicatorType.URL), ] @pytest.mark.parametrize("indicator, expected_indicator_type", INDICATORS_CLASSIFICATION_DATA) def test_indicator_classified_to_the_correct_type(mocker, auto_focus_client, indicator, expected_indicator_type): """ Given - an indicator as string. When - trying to find the indicator type. Then - the indicator is classified correctly. """ mocker.patch.object(auto_focus_client, "daily_custom_http_request") assert auto_focus_client.find_indicator_type(indicator=indicator) == expected_indicator_type def test_get_indicators_command(mocker, auto_focus_client): """ Given - indicators list When - getting all the indicators Then - make sure the indicator type and values are returned correctly. """ mocker.patch.object(auto_focus_client, "daily_custom_http_request", return_value=INDICATORS) _, _, indicators = get_indicators_command(auto_focus_client, {}, feed_tags=[], tlp_color=None) for i in range(0, 9): assert indicators[i]["type"] == TYPES[i] assert indicators[i]["value"] in INDICATORS[i]