<?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 DGA Regex in Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285131#M86242</link>
    <description>&lt;P&gt;I am trying to search through logs for unusual domains generated by DGAs. I want to use regex to search for domain names with 7-12 characters ending with TLD. The characters are alphanumeric.&lt;BR /&gt;
For example, abc1djdfkf.xyz&lt;/P&gt;

&lt;P&gt;I have used the following regex patterns, but did not see the desired results.&lt;/P&gt;

&lt;P&gt;rex field=URL "(?\w{7,12}.(XYZ))$" &lt;/P&gt;</description>
    <pubDate>Sat, 11 Feb 2017 15:52:14 GMT</pubDate>
    <dc:creator>masfar</dc:creator>
    <dc:date>2017-02-11T15:52:14Z</dc:date>
    <item>
      <title>DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285131#M86242</link>
      <description>&lt;P&gt;I am trying to search through logs for unusual domains generated by DGAs. I want to use regex to search for domain names with 7-12 characters ending with TLD. The characters are alphanumeric.&lt;BR /&gt;
For example, abc1djdfkf.xyz&lt;/P&gt;

&lt;P&gt;I have used the following regex patterns, but did not see the desired results.&lt;/P&gt;

&lt;P&gt;rex field=URL "(?\w{7,12}.(XYZ))$" &lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 15:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285131#M86242</guid>
      <dc:creator>masfar</dc:creator>
      <dc:date>2017-02-11T15:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285132#M86243</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex field=URL "(?&amp;lt;domain&amp;gt;\w{7,12}\.xyz)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Feb 2017 16:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285132#M86243</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-11T16:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285133#M86244</link>
      <description>&lt;P&gt;somesoni2- The DGA I am observing generates domains in  alphanumeric characters, so in my regex I want to be able to search for domains that contain ONLY alphanumeric values.  For example, I want to get a hit on ababdbdb233.xyz and not on djdhdjahdja.xyz. &lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 17:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285133#M86244</guid>
      <dc:creator>masfar</dc:creator>
      <dc:date>2017-02-11T17:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285134#M86245</link>
      <description>&lt;P&gt;So... you're looking for seven to twelve alphanumeric characters where at least one is a digit and at least one is a letter?&lt;BR /&gt;
I'll be lazy and cheat:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=URL "(?&amp;lt;url_dga&amp;gt;(?=\w*\d)(?=\w*[a-zA-Z])\w{7,12}\.xyz)"
| regex URL="(?=\w*\d)(?=\w*[a-zA-Z])\w{7,12}\.xyz"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note 1: I've added &lt;CODE&gt;regex&lt;/CODE&gt;, in case you're trying to filter and not extract a field.&lt;BR /&gt;
Note 2: djdhdjahdja.xyz is technically alphanumeric &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;BR /&gt;
Note 3: To add more laziness, take a look at &lt;A href="https://splunkbase.splunk.com/app/3435"&gt;https://splunkbase.splunk.com/app/3435&lt;/A&gt; - one of its examples targets algorithmically generated domains.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 18:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285134#M86245</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-11T18:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285135#M86246</link>
      <description>&lt;P&gt;Martin- Thanks, but the query you mentioned is not providing the desired results. For example, the results include abc.zybdkdke12.xyz , &lt;A href="http://www.dahdha2ddalk.xyz"&gt;www.dahdha2ddalk.xyz&lt;/A&gt;, when I am only interested in the main domain itself (zybdkdke12.xyz and dahdha2ddalk.xyz).&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 18:53:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285135#M86246</guid>
      <dc:creator>masfar</dc:creator>
      <dc:date>2017-02-11T18:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285136#M86247</link>
      <description>&lt;P&gt;Well, it does match the example you gave that should match, and doesn't match the example you gave that shouldn't match.&lt;/P&gt;

&lt;P&gt;Are you trying to extract a new field &lt;CODE&gt;|rex&lt;/CODE&gt; or filter results &lt;CODE&gt;|regex&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 19:36:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285136#M86247</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-11T19:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285137#M86248</link>
      <description>&lt;P&gt;Martin- I am looking to extract the field.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 20:43:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285137#M86248</guid>
      <dc:creator>masfar</dc:creator>
      <dc:date>2017-02-11T20:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: DGA Regex in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285138#M86249</link>
      <description>&lt;P&gt;I've added back the &lt;CODE&gt;rex&lt;/CODE&gt; command to extract fields rather than searching by regex.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 21:15:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DGA-Regex-in-Splunk/m-p/285138#M86249</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-11T21:15:07Z</dc:date>
    </item>
  </channel>
</rss>

