<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Detailed logs from Cortex XDR in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/740631#M117738</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274211"&gt;@securepoint&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I cant get any of the Cortex docs to load for me at the moment, however at a previous customer we used Splunk SC4S to receive a syslog feed from Cortex and then sent this to Splunk over HEC. This was the raw data rather than alerts etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you able to configure any outputs such as syslog from your Cortex XDR configuration?&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
    <pubDate>Mon, 03 Mar 2025 19:28:25 GMT</pubDate>
    <dc:creator>livehybrid</dc:creator>
    <dc:date>2025-03-03T19:28:25Z</dc:date>
    <item>
      <title>Detailed logs from Cortex XDR</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/740627#M117737</link>
      <description>&lt;P&gt;I'm trying to extract endpoint data from Cortex XDR, but I don't want to see just alerts in Splunk—I need all the endpoint data collected by XDR to be replicated in Splunk. Neither Palo Alto nor Splunk support has been able to assist with this. I can't be the first person to ask about it since this is a fundamental requirement—unless it's simply not possible and everyone else already knows that except me. There should be one way calling the APIs through HEC in Splunk, I need to write a script for it, any one tried this approach or any other ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 18:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/740627#M117737</guid>
      <dc:creator>securepoint</dc:creator>
      <dc:date>2025-03-03T18:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed logs from Cortex XDR</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/740631#M117738</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274211"&gt;@securepoint&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I cant get any of the Cortex docs to load for me at the moment, however at a previous customer we used Splunk SC4S to receive a syslog feed from Cortex and then sent this to Splunk over HEC. This was the raw data rather than alerts etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you able to configure any outputs such as syslog from your Cortex XDR configuration?&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 19:28:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/740631#M117738</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-03T19:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed logs from Cortex XDR</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/740932#M117776</link>
      <description>&lt;P&gt;Thanks for hitting me back, syslog has been tried but raw data has always been unsuccessful. As you suggested I will try SC4S&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 14:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/740932#M117776</guid>
      <dc:creator>securepoint</dc:creator>
      <dc:date>2025-03-05T14:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed logs from Cortex XDR</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/741203#M117849</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274211"&gt;@securepoint&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;API-to-HEC Approach&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Using the Cortex XDR APIs with Splunk’s HEC is a viable path. Here’s how you could approach it:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;API Access&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;:&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;You’ll need an API key and key ID from Cortex XDR (check the "Getting Started with Cortex XDR APIs" guide). Ensure you have the right permissions.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Relevant Endpoints&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/public_api/v1/endpoints/get_endpoints&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;: Lists all endpoints with basic metadata (e.g., hostname, IP, OS).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/public_api/v1/endpoints/get_endpoint&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;: Detailed data for a specific endpoint (e.g., status, last seen).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/public_api/v1/alerts/get_alerts_multi_events&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; Alert details, but you want more than this.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/public_api/v1/incidents/get_incidents&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt; and &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/public_api/v1/incidents/get_incident_extra_data&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;: Incident data with some context.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR-REST-API/Get-Endpoint" target="_blank" rel="noopener"&gt;https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR-REST-API/Get-Endpoint&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR-REST-API/Get-all-Endpoints" target="_blank" rel="noopener"&gt;https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR-REST-API/Get-all-Endpoints&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR-REST-API" target="_blank" rel="noopener"&gt;https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR-REST-API&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Raw Data&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;: There’s no direct "get all endpoint telemetry" endpoint. You’d need to use XQL (XDR Query Language) via the &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/public_api/v1/xql/start_xql_query&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt; endpoint to query raw telemetry (e.g., process, network, file events).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Splunk HEC Setup&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Configure an HEC token in Splunk (Settings &amp;gt; Data Inputs &amp;gt; HTTP Event Collector).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Ensure the endpoint is reachable (e.g., &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;https://&amp;lt;splunk_host&amp;gt;:8088/services/collector&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Data sent to HEC should be JSON-formatted, with fields like &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;event&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;time&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;host&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;, and &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;source type&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Scripting the Solution&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;You’ll need a script (e.g., in Python) to:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Authenticate with the Cortex XDR API.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Query endpoint data and/or XQL for raw telemetry.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Format the results as JSON.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Send it to Splunk HEC.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here’s a basic example script to get you started:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;import requests
import json
import time

# Cortex XDR API credentials
api_key = "your_api_key"
api_key_id = "your_api_key_id"
fqdn = "your-tenant.xdr.us.paloaltonetworks.com"  # Replace with your tenant FQDN
headers = {
    "x-xdr-auth-id": api_key_id,
    "Authorization": api_key,
    "Content-Type": "application/json"
}

# Splunk HEC settings
hec_url = "https://your-splunk-host:8088/services/collector"
hec_token = "your_hec_token"
hec_headers = {"Authorization": f"Splunk {hec_token}"}

# Function to query Cortex XDR endpoints
def get_all_endpoints():
    url = f"https://api-{fqdn}/public_api/v1/endpoints/get_endpoints"
    response = requests.post(url, headers=headers, json={"request_data": {}})
    if response.status_code == 200:
        return response.json().get("reply", {}).get("endpoints", [])
    else:
        print(f"Error: {response.status_code} - {response.text}")
        return []

# Function to send data to Splunk HEC
def send_to_splunk(data):
    payload = {
        "event": data,
        "time": int(time.time()),
        "sourcetype": "cortex_xdr_endpoint",
        "host": "cortex_xdr"
    }
    response = requests.post(hec_url, headers=hec_headers, json=payload)
    if response.status_code == 200:
        print("Data sent to Splunk successfully")
    else:
        print(f"HEC Error: {response.status_code} - {response.text}")

# Main logic
endpoints = get_all_endpoints()
for endpoint in endpoints:
    send_to_splunk(endpoint)
    time.sleep(1)  # Throttle to avoid rate limits

# Example XQL query for raw telemetry (adjust as needed)
xql_query = {
    "request_data": {
        "query": "dataset = xdr_data | filter event_type = PROCESS | limit 100",
        "timeframe": {"relative": {"unit": "hour", "value": -24}}}
}
xql_url = f"https://api-{fqdn}/public_api/v1/xql/start_xql_query"
xql_response = requests.post(xql_url, headers=headers, json=xql_query)
if xql_response.status_code == 200:
    query_id = xql_response.json().get("reply", {}).get("query_id")
    # Fetch results with /get_xql_query_results (implement polling logic)
    # Send results to Splunk&lt;/PRE&gt;&lt;/DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;A href="https://pan.dev/splunk/docs/getting-data-in/" target="_blank" rel="noopener"&gt;https://pan.dev/splunk/docs/getting-data-in/&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xdr-and-splunk/td-p/476724" target="_blank" rel="noopener"&gt;https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xdr-and-splunk/td-p/476724&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://docs.paloaltonetworks.com/strata-logging-service/administration/forward-logs/forward-logs-to-an-https-server" target="_blank" rel="noopener"&gt;https://docs.paloaltonetworks.com/strata-logging-service/administration/forward-logs/forward-logs-to-an-https-server&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-and-Palo-Alto-Cortex-Data-Lake-Data-for-global-protect/m-p/493384" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-and-Palo-Alto-Cortex-Data-Lake-Data-for-global-protect/m-p/493384&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 08 Mar 2025 10:54:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Detailed-logs-from-Cortex-XDR/m-p/741203#M117849</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2025-03-08T10:54:02Z</dc:date>
    </item>
  </channel>
</rss>

