<?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 How to use the email sender from one search as input for another search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-email-sender-from-one-search-as-input-for-another/m-p/264182#M79312</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm still learning a lot about Splunk so bear with me.&lt;/P&gt;

&lt;P&gt;My current search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'get_phished' | stats values(recipient) as recipient by subject, filename, sender | search NOT recipient &amp;gt;2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;get_phished&lt;/CODE&gt; is actually a macro containing the following fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=email recipient=insert_user_here OR recipient=insert_user_here, etc 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The search results produce a table consisting of &lt;STRONG&gt;subject&lt;/STRONG&gt;, &lt;STRONG&gt;filename&lt;/STRONG&gt;, &lt;STRONG&gt;sender&lt;/STRONG&gt;, and which users received the phishing email if the count is greater than 2. &lt;/P&gt;

&lt;P&gt;What I would like to do is append another search that looks for additional emails not included in my manually updated list and add them in another category called &lt;STRONG&gt;new_targets&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;From what I've noticed over the past few months, these senders are consistently using a random combination of existing phishing targets from previous attempts in conjunction with their newly acquired list of targets. &lt;/P&gt;

&lt;P&gt;For example,&lt;/P&gt;

&lt;P&gt;Week 1 phishing targets:&lt;BR /&gt;
&lt;A href="mailto:a@email.com"&gt;a@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:b@email.com"&gt;b@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:c@email.com"&gt;c@email.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Week 2 phishing targets:&lt;BR /&gt;
&lt;A href="mailto:a@email.com"&gt;a@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:b@email.com"&gt;b@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:d@email.com"&gt;d@email.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In the example above, in week 2, 1 new email was targeted in combination with some of the users from week 1. &lt;BR /&gt;
I think this can be accomplished by searching against the sender from the original search and looking for additional recipients from that sender not included in the current list of recipients, but I’m not entirely sure how to do that.&lt;/P&gt;

&lt;P&gt;Thoughts?&lt;/P&gt;

&lt;P&gt;V/r&lt;BR /&gt;
Andrew&lt;/P&gt;</description>
    <pubDate>Mon, 07 Dec 2015 14:22:24 GMT</pubDate>
    <dc:creator>adayton20</dc:creator>
    <dc:date>2015-12-07T14:22:24Z</dc:date>
    <item>
      <title>How to use the email sender from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-email-sender-from-one-search-as-input-for-another/m-p/264182#M79312</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm still learning a lot about Splunk so bear with me.&lt;/P&gt;

&lt;P&gt;My current search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'get_phished' | stats values(recipient) as recipient by subject, filename, sender | search NOT recipient &amp;gt;2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;get_phished&lt;/CODE&gt; is actually a macro containing the following fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=email recipient=insert_user_here OR recipient=insert_user_here, etc 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The search results produce a table consisting of &lt;STRONG&gt;subject&lt;/STRONG&gt;, &lt;STRONG&gt;filename&lt;/STRONG&gt;, &lt;STRONG&gt;sender&lt;/STRONG&gt;, and which users received the phishing email if the count is greater than 2. &lt;/P&gt;

&lt;P&gt;What I would like to do is append another search that looks for additional emails not included in my manually updated list and add them in another category called &lt;STRONG&gt;new_targets&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;From what I've noticed over the past few months, these senders are consistently using a random combination of existing phishing targets from previous attempts in conjunction with their newly acquired list of targets. &lt;/P&gt;

&lt;P&gt;For example,&lt;/P&gt;

&lt;P&gt;Week 1 phishing targets:&lt;BR /&gt;
&lt;A href="mailto:a@email.com"&gt;a@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:b@email.com"&gt;b@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:c@email.com"&gt;c@email.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Week 2 phishing targets:&lt;BR /&gt;
&lt;A href="mailto:a@email.com"&gt;a@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:b@email.com"&gt;b@email.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="mailto:d@email.com"&gt;d@email.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In the example above, in week 2, 1 new email was targeted in combination with some of the users from week 1. &lt;BR /&gt;
I think this can be accomplished by searching against the sender from the original search and looking for additional recipients from that sender not included in the current list of recipients, but I’m not entirely sure how to do that.&lt;/P&gt;

&lt;P&gt;Thoughts?&lt;/P&gt;

&lt;P&gt;V/r&lt;BR /&gt;
Andrew&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 14:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-email-sender-from-one-search-as-input-for-another/m-p/264182#M79312</guid>
      <dc:creator>adayton20</dc:creator>
      <dc:date>2015-12-07T14:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the email sender from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-email-sender-from-one-search-as-input-for-another/m-p/264183#M79313</link>
      <description>&lt;P&gt;There are a few options where you can do a sub-search (append, join etc), but sub-searches are very inefficient and have limitations. The most efficient way would be to include both sources in your &lt;CODE&gt;search index=mail (source=list1 OR source=list2 )&lt;/CODE&gt; and with the combination of &lt;CODE&gt;dedupe&lt;/CODE&gt; and &lt;CODE&gt;stats&lt;/CODE&gt; you should be able to get a distinct list of "phishers"&lt;/P&gt;

&lt;P&gt;Hopefully this gives you some ideas to explore.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 21:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-email-sender-from-one-search-as-input-for-another/m-p/264183#M79313</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-12-07T21:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the email sender from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-email-sender-from-one-search-as-input-for-another/m-p/264184#M79314</link>
      <description>&lt;P&gt;Appreciate the prompt response. &lt;/P&gt;

&lt;P&gt;The sources are actually the same. Both sources I'm looking in are&lt;CODE&gt;index=email&lt;/CODE&gt;. I tried adding a subsearch that renames two fields in order to create the ability to compare them and then narrowing down the searches by searching for events that contain the same sender and where the recipient doesn't equal the new recipient. It isn't returning the results I'm looking for and instead just matching on the same sender and recipient fields and displaying them.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`GetPhished`
| stats values(recipient) as recipient by subject, filename, sender
| search NOT recipient &amp;gt;2
| join [| search index=email sourcetype=email_log filename=* | rename sender AS send | rename recipient AS new_recip | stats values(new_recip) as new_recip by send, subject, filename | search NOT new_recip &amp;gt;0]
| where sender = send AND recipient !=new_recip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:56:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-email-sender-from-one-search-as-input-for-another/m-p/264184#M79314</guid>
      <dc:creator>adayton20</dc:creator>
      <dc:date>2015-12-08T13:56:18Z</dc:date>
    </item>
  </channel>
</rss>

