<?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 Where to Start - Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76325#M19293</link>
    <description>&lt;P&gt;Hi guys,&lt;BR /&gt;
I've got a script uploading html files into Splunk. This uses IOC to check which hosts are infected and by what malware. What the malware changes and so on. I have one particular file which has the name of the Malware, the hash, a description and even the files changed. Added with the IP address of the host, it has everything.&lt;/P&gt;

&lt;P&gt;My question is though, how do I tell splunk where to find the name of the malware and where the hash is. Bearing in mind that the name location will stay the same but the name will differ depending on the malware found.&lt;BR /&gt;
I need this so as to have counters and timecharts of which host is infected by what.&lt;/P&gt;

&lt;P&gt;Sample File:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;xmlns:ioc="http://schemas.mandiant.com/2010/ioc" id="openioc"&amp;gt;
&amp;lt;div id="openioc-head"&amp;gt;
&amp;lt;div id="openioc-logo"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id="openioc-title"&amp;gt;
&amp;lt;h1&amp;gt;
  ZeroAccess/Siref.P&amp;lt;/h1&amp;gt;
&amp;lt;h4&amp;gt;0d0a744b-f7bf-453d-9105-5662bc27086e&amp;lt;/h4&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div id="openioc-main"&amp;gt;

Show all 115 lines

host=192.168.89.137  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to tell Splunk that in indexes with xmlns:ioc have the malware title in h1 and the hash in h4&lt;/P&gt;

&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2013 14:05:36 GMT</pubDate>
    <dc:creator>SplunkUser5888</dc:creator>
    <dc:date>2013-06-26T14:05:36Z</dc:date>
    <item>
      <title>Where to Start - Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76325#M19293</link>
      <description>&lt;P&gt;Hi guys,&lt;BR /&gt;
I've got a script uploading html files into Splunk. This uses IOC to check which hosts are infected and by what malware. What the malware changes and so on. I have one particular file which has the name of the Malware, the hash, a description and even the files changed. Added with the IP address of the host, it has everything.&lt;/P&gt;

&lt;P&gt;My question is though, how do I tell splunk where to find the name of the malware and where the hash is. Bearing in mind that the name location will stay the same but the name will differ depending on the malware found.&lt;BR /&gt;
I need this so as to have counters and timecharts of which host is infected by what.&lt;/P&gt;

&lt;P&gt;Sample File:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;xmlns:ioc="http://schemas.mandiant.com/2010/ioc" id="openioc"&amp;gt;
&amp;lt;div id="openioc-head"&amp;gt;
&amp;lt;div id="openioc-logo"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id="openioc-title"&amp;gt;
&amp;lt;h1&amp;gt;
  ZeroAccess/Siref.P&amp;lt;/h1&amp;gt;
&amp;lt;h4&amp;gt;0d0a744b-f7bf-453d-9105-5662bc27086e&amp;lt;/h4&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div id="openioc-main"&amp;gt;

Show all 115 lines

host=192.168.89.137  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to tell Splunk that in indexes with xmlns:ioc have the malware title in h1 and the hash in h4&lt;/P&gt;

&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 14:05:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76325#M19293</guid>
      <dc:creator>SplunkUser5888</dc:creator>
      <dc:date>2013-06-26T14:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Where to Start - Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76326#M19294</link>
      <description>&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i)&amp;lt;h1&amp;gt;(?P&amp;lt;dd&amp;gt;[^&amp;lt;]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i)&amp;lt;h4&amp;gt;(?P&amp;lt;dd&amp;gt;[^&amp;lt;]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where "dd" is going to be what you want to call the field extraction. Use FIELDNAME if you are using the interactive field extractor. Then name it when you save.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 15:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76326#M19294</guid>
      <dc:creator>antlefebvre</dc:creator>
      <dc:date>2013-06-26T15:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Where to Start - Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76327#M19295</link>
      <description>&lt;P&gt;Thanks for the help, I'm away for the week so I'll try it when I get back.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:11:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76327#M19295</guid>
      <dc:creator>SplunkUser5888</dc:creator>
      <dc:date>2013-06-26T16:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Where to Start - Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76328#M19296</link>
      <description>&lt;P&gt;Thanks that was perfect, I'm still trying to get around regex &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 07:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76328#M19296</guid>
      <dc:creator>SplunkUser5888</dc:creator>
      <dc:date>2013-07-01T07:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Where to Start - Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76329#M19297</link>
      <description>&lt;P&gt;regex is painful for me as well. Try the interactive field extractor or the | erex command. Much easier.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 11:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-to-Start-Field-Extraction/m-p/76329#M19297</guid>
      <dc:creator>antlefebvre</dc:creator>
      <dc:date>2013-07-01T11:59:46Z</dc:date>
    </item>
  </channel>
</rss>

