<?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 to compare the data from CSV and get the desired result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514780#M144498</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Giuseppe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help on this!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;That's correct! I want to enrich the result of the search with the information about TLS.&lt;/P&gt;&lt;P&gt;I want to highlight the condition TLS=1.2&lt;/P&gt;&lt;P&gt;There are two parts of it&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using below command, I am getting the list of domains within specific time frame "index="pp_index" sourcetype="pp_messagelog" | rex field=envelope.from "(?&amp;lt;=@)(?&amp;lt;domain&amp;gt;([a-zA-z0-9.-]*))" | dedup domain | table domain" AND&lt;/LI&gt;&lt;LI&gt;I have the list of domains which is stored in domains.csv "| inputlookup Domains.csv"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want to check the domains from the list (domains.csv) with the source (pp_messagelog) and check if it's using TLS 1.2 or not. If the domain is not from the list then simply ignore that domain.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;</description>
    <pubDate>Tue, 18 Aug 2020 21:43:09 GMT</pubDate>
    <dc:creator>nitinpa</dc:creator>
    <dc:date>2020-08-18T21:43:09Z</dc:date>
    <item>
      <title>How to compare the data from CSV and get the desired result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514360#M144357</link>
      <description>&lt;P&gt;I have a CSV (domains.csv) that contain the list of domains. I have uploaded into Splunk and get the result using [| inputlookup domains.csv]. Splunk is getting the data from email system for inbound/outbound emails.&lt;/P&gt;&lt;P&gt;I want to check against my domains list which are using email security protocols like TLS, SPF, DKIM and DMARC. How can I get that info?&lt;/P&gt;&lt;P&gt;index="pp_index" sourcetype="pp_messagelog" [| inputlookup domains.csv ]&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 23:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514360#M144357</guid>
      <dc:creator>nitinpa</dc:creator>
      <dc:date>2020-08-16T23:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare the data from CSV and get the desired result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514405#M144367</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224754"&gt;@nitinpa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to filter a search using a lookup, you have to be sure that the field names are the same both in search and in lookup (fields are case sensitive), if not you have to rename one of them.&lt;/P&gt;&lt;P&gt;In few words, if in the pp_index the url is called "url" and in lookup is called domain, you have to run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="pp_index" sourcetype="pp_messagelog" [| inputlookup domains.csv | rename domain AS url | fields url ]
| ...&lt;/LI-CODE&gt;&lt;P&gt;if in addition, domain is a part of the url and not the full url, you have to extract the domain from the url using a regex.&lt;/P&gt;&lt;P&gt;If you share an example of logs and of domain .csv, I could be more precise.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 08:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514405#M144367</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-17T08:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare the data from CSV and get the desired result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514555#M144424</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Giuseppe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help on this!&lt;/P&gt;&lt;P&gt;I got the list of domains from domains.csv. I want to search those domains against inbound emails which is stored in sourcetype = PP_messagelog. I want to match the sender domain field and check if they are using proper email security protocols or not by verifying TLS, SPF, DKIM DMARC etc.&lt;/P&gt;&lt;P&gt;There is a field called "connection.tls.inbound.version" so I can check from that CSV that this domain is using TLS v1.2 or 1.1 or 1&lt;/P&gt;&lt;P&gt;For example, If the list contains gmail.com. I will check gmail.com against search and using the above field, find out that whether gmail.com is using TLSv1.2 or not.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 21:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514555#M144424</guid>
      <dc:creator>nitinpa</dc:creator>
      <dc:date>2020-08-17T21:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare the data from CSV and get the desired result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514622#M144453</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224754"&gt;@nitinpa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I try to summarize:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;in your lookup (called e.g. "my_domain_lookup") you have two fields:&lt;UL&gt;&lt;LI&gt;domain (e.g.: gmail.com),&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;connection.tls.inbound.version (e.g.: 1.2, 1.1, 1.0);&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;in the events you have email addresses (e.g. &lt;A href="mailto:my_address@gmail.com" target="_blank"&gt;my_address@gmail.com&lt;/A&gt;) in a field called "email";&lt;/LI&gt;&lt;LI&gt;you want to enrich the reaults of your search with the information about TLS.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P&gt;Only two questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;do you want to highlight the condition TLS=1.2 or TLS!=1.2?&lt;/LI&gt;&lt;LI&gt;what happens if the domain isn't in the lookup?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In the meantime, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index sourcetype=PP_messagelog
| rex field=email "[^@]*@(?&amp;lt;domain&amp;gt;.*)"
| dedup domain
| lookup my_domain_lookup domain OUTPUT connection.tls.inbound.version
| table domain connection.tls.inbound.version&lt;/LI-CODE&gt;&lt;P&gt;to have the list of all domains with related TLS (when present).&lt;/P&gt;&lt;P&gt;At the end you can add a condition to filter domains based on TLS (e.g. to find only TLS=1.2):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search connection.tls.inbound.version="1.2"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 07:35:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514622#M144453</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-18T07:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare the data from CSV and get the desired result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514780#M144498</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Giuseppe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help on this!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;That's correct! I want to enrich the result of the search with the information about TLS.&lt;/P&gt;&lt;P&gt;I want to highlight the condition TLS=1.2&lt;/P&gt;&lt;P&gt;There are two parts of it&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using below command, I am getting the list of domains within specific time frame "index="pp_index" sourcetype="pp_messagelog" | rex field=envelope.from "(?&amp;lt;=@)(?&amp;lt;domain&amp;gt;([a-zA-z0-9.-]*))" | dedup domain | table domain" AND&lt;/LI&gt;&lt;LI&gt;I have the list of domains which is stored in domains.csv "| inputlookup Domains.csv"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want to check the domains from the list (domains.csv) with the source (pp_messagelog) and check if it's using TLS 1.2 or not. If the domain is not from the list then simply ignore that domain.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 21:43:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514780#M144498</guid>
      <dc:creator>nitinpa</dc:creator>
      <dc:date>2020-08-18T21:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare the data from CSV and get the desired result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514849#M144527</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224754"&gt;@nitinpa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you speak of source (pp_messagelog), but from your question it seems to be the sourcetype: which information have you in the lookup: source or sourcetype?&lt;/P&gt;&lt;P&gt;in other words, do you want to relate the main search and the lookup using the sourcetype, the domain or both?&lt;/P&gt;&lt;P&gt;If you want to use the sourcetype to check the TLS and not the domain, you have only to modify just a little bit my previous search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index sourcetype=PP_messagelog
| rex field=email "[^@]*@(?&amp;lt;domain&amp;gt;.*)"
| dedup domain
| lookup my_domain_lookup sourcetype OUTPUT connection.tls.inbound.version
| table domain sourcetype connection.tls.inbound.version
| search connection.tls.inbound.version="1.2"&lt;/LI-CODE&gt;&lt;P&gt;if you want to use the domain, use the old search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 07:08:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/514849#M144527</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-19T07:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare the data from CSV and get the desired result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/515069#M144590</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Giuseppe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help on this!&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 22:15:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-the-data-from-CSV-and-get-the-desired-result/m-p/515069#M144590</guid>
      <dc:creator>nitin_pangerkar</dc:creator>
      <dc:date>2020-08-19T22:15:50Z</dc:date>
    </item>
  </channel>
</rss>

