<?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: How do you search all fields in a sourcetype with regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448095#M126986</link>
    <description>&lt;P&gt;It's any IIS logs, but here's a simple example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2018-09-11 18:25:33 172.x.x.x GET /App/Admin/Login.aspx - 443 - 192.168.0.1 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_13_6)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/69.0.3497.81+Safari/537.36 - 302 0 0 0 127.0.0.1 1234567890abcdef-ABC - - TLSv1.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This expands out to various event fields, like true_ip and cs_method.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:14:30 GMT</pubDate>
    <dc:creator>CMSchelin</dc:creator>
    <dc:date>2020-09-29T21:14:30Z</dc:date>
    <item>
      <title>How do you search all fields in a sourcetype with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448092#M126983</link>
      <description>&lt;P&gt;The context: I'm looking for sensitive information patterns showing up in the IIS sourcetype that we have.&lt;/P&gt;

&lt;P&gt;What I can already do: I can run this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="iis"
| rex field=_raw "[^(^|[0-9])](?&amp;lt;ccmaybe&amp;gt;(5[1-5][0-9]{14})|(4[0-9]{12}([0-9]{3})?)|(3[47][0-9]{13})|(6011[0-9]{12})|((30[0-5]|36[0-9]|38[0-9])[0-9]{11}))"
| search ccmaybe!=""
| table ccmaybe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I need is the field this shows up in, largely so I can exclude known fields that will never have that data. But I do not at all want to specify each and every field that are in IIS logs: partly because that query would be tremendous, and partly because what if we add items to the logs?&lt;/P&gt;

&lt;P&gt;What should I do?&lt;/P&gt;

&lt;P&gt;[edit 9/11] Updating with an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2018-09-11 18:25:33 172.0.0.1 GET /App/Admin/Login.aspx - 443 - 192.168.0.1 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_13_6)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/69.0.3497.81+Safari/537.36 - 302 0 0 0 127.0.0.1 1234567890abcdef-ABC - - TLSv1.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem I'm having is, I want to search each field for anything that might have CC data, but I want to do this searching against the extracted fields, not against the raw data. I tried using the Luhn Splunk add-on, but it parses the entire raw log without spaces, which lumps everything together regardless of field.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 22:16:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448092#M126983</guid>
      <dc:creator>CMSchelin</dc:creator>
      <dc:date>2018-09-10T22:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you search all fields in a sourcetype with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448093#M126984</link>
      <description>&lt;P&gt;I think the &lt;CODE&gt;punct&lt;/CODE&gt; field would be an excellent choice here. It would be the fattest way to exclude logging formats which are irrelevent &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Splexicon:Punct"&gt;https://docs.splunk.com/Splexicon:Punct&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 22:44:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448093#M126984</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-09-10T22:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do you search all fields in a sourcetype with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448094#M126985</link>
      <description>&lt;P&gt;can you please post a sample of the data?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 23:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448094#M126985</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2018-09-10T23:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do you search all fields in a sourcetype with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448095#M126986</link>
      <description>&lt;P&gt;It's any IIS logs, but here's a simple example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2018-09-11 18:25:33 172.x.x.x GET /App/Admin/Login.aspx - 443 - 192.168.0.1 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_13_6)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/69.0.3497.81+Safari/537.36 - 302 0 0 0 127.0.0.1 1234567890abcdef-ABC - - TLSv1.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This expands out to various event fields, like true_ip and cs_method.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-search-all-fields-in-a-sourcetype-with-regex/m-p/448095#M126986</guid>
      <dc:creator>CMSchelin</dc:creator>
      <dc:date>2020-09-29T21:14:30Z</dc:date>
    </item>
  </channel>
</rss>

