<?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 Password spraying in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/password-spraying/m-p/1242725#M8894</link>
    <description>&lt;P&gt;Hi,&lt;BR data-start="54" data-end="57" /&gt;Could you provide an XQL query to detect &lt;STRONG data-start="98" data-end="119" data-is-only-node=""&gt;password spraying&lt;/STRONG&gt;, specifically when the &lt;STRONG data-start="143" data-end="202"&gt;same IP address attempts logins on multiple AD accounts&lt;/STRONG&gt;?&lt;BR data-start="203" data-end="206" /&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Nov 2025 10:30:52 GMT</pubDate>
    <dc:creator>Hichamchakik</dc:creator>
    <dc:date>2025-11-27T10:30:52Z</dc:date>
    <item>
      <title>Password spraying</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/password-spraying/m-p/1242725#M8894</link>
      <description>&lt;P&gt;Hi,&lt;BR data-start="54" data-end="57" /&gt;Could you provide an XQL query to detect &lt;STRONG data-start="98" data-end="119" data-is-only-node=""&gt;password spraying&lt;/STRONG&gt;, specifically when the &lt;STRONG data-start="143" data-end="202"&gt;same IP address attempts logins on multiple AD accounts&lt;/STRONG&gt;?&lt;BR data-start="203" data-end="206" /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 10:30:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/password-spraying/m-p/1242725#M8894</guid>
      <dc:creator>Hichamchakik</dc:creator>
      <dc:date>2025-11-27T10:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Password spraying</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/password-spraying/m-p/1244989#M8962</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/246112"&gt;@Hichamchakik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greetings for the day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following query identifies &lt;STRONG&gt;unique IP addresses attempting to authenticate against multiple distinct accounts within a specified timeframe&lt;/STRONG&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;dataset = xdr_data
| filter action_evtlog_event_id in (4625, 4771, 4768, 4769) // Windows Logon Failure and Kerberos Pre-auth failure IDs
| alter 
    TargetUserName = json_extract_scalar(action_evtlog_data_fields, "$.TargetUserName"),
    SourceIp = replace(json_extract_scalar(action_evtlog_data_fields, "$.IpAddress"), "::ffff:", "")
| filter TargetUserName != null and SourceIp not in ("-", "", "127.0.0.1", "::1")
| filter TargetUserName not contains "$" // Exclude machine accounts
| comp 
    count_distinct(TargetUserName) as unique_accounts_targeted, 
    count(TargetUserName) as total_failure_count,
    values(TargetUserName) as list_of_accounts
    by SourceIp
| filter unique_accounts_targeted &amp;gt; 10 // Threshold: More than 10 unique accounts from one IP
| sort desc unique_accounts_targeted
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;
&lt;H4&gt;Key Considerations for Detection&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Licensing Requirements:&lt;/STRONG&gt;&lt;BR /&gt;To collect and forward specific Windows Event Logs (such as Event ID 4625) from internal endpoints or Domain Controllers, an &lt;STRONG&gt;Extended Threat Hunting (XTH)&lt;/STRONG&gt; add-on license is typically required.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Built-in Analytics:&lt;/STRONG&gt;&lt;BR /&gt;Cortex XDR includes native analytics detectors for this behavior, such as &lt;STRONG&gt;“Internal Login Password Spray on many users.”&lt;/STRONG&gt; These detectors are often set to &lt;STRONG&gt;Informational&lt;/STRONG&gt; or &lt;STRONG&gt;Low&lt;/STRONG&gt; severity by default unless the activity volume is exceptionally high.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Internal vs. External IPs:&lt;/STRONG&gt;&lt;BR /&gt;Native XDR detectors are primarily optimized for &lt;STRONG&gt;external IP addresses&lt;/STRONG&gt;. For &lt;STRONG&gt;internal IP addresses&lt;/STRONG&gt;, behavior-based detection may require the baseline learning period (typically around &lt;STRONG&gt;30 days&lt;/STRONG&gt;) to be completed.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Data Extraction:&lt;/STRONG&gt;&lt;BR /&gt;When querying &lt;CODE&gt;xdr_data&lt;/CODE&gt;, usernames and IP addresses are often nested within the &lt;CODE&gt;action_evtlog_data_fields&lt;/CODE&gt; JSON object and must be extracted using &lt;CODE&gt;alter&lt;/CODE&gt; with &lt;CODE&gt;json_extract_scalar&lt;/CODE&gt; (or equivalent operators).&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;
&lt;H2&gt;Alternative for VPN Logs&lt;/H2&gt;
&lt;P&gt;If you are specifically investigating &lt;STRONG&gt;password spraying against GlobalProtect or VPN gateways&lt;/STRONG&gt;, use the &lt;CODE&gt;vpn_logs&lt;/CODE&gt; dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;dataset = vpn_logs 
| filter auth_outcome = "FAILURE"
| comp 
    count_distinct(auth_identity) as unique_auth_ids, 
    values(auth_identity) as attempted_accounts 
    by auth_client // Source IP
| filter unique_auth_ids &amp;gt;= 5
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you feel this has answered your query, please let us know by clicking like and on&amp;nbsp;&lt;STRONG&gt;"mark this as a Solution".&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Happy New Year!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;S. Subashkar Sekar&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2026 20:11:37 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/password-spraying/m-p/1244989#M8962</guid>
      <dc:creator>susekar</dc:creator>
      <dc:date>2026-01-06T20:11:37Z</dc:date>
    </item>
  </channel>
</rss>

