<?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: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342687#M101514</link>
    <description>&lt;P&gt;Yeah, great point, @starcher. As is so often true with Splunk, the "correct" approach will change based on data size/types, and you'll be best off testing a few different routes and seeing which one fits your environment best.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Mar 2018 19:16:57 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2018-03-09T19:16:57Z</dc:date>
    <item>
      <title>Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342677#M101504</link>
      <description>&lt;P&gt;Our campus is putting together a database of systems with sensitive or restricted information on them. I'd like to export the IP addresses from this system in a list format (just IP addresses) and find a way of using these in a search of indexed data.&lt;/P&gt;

&lt;P&gt;For example, search Palo Alto logs in Splunk and have the search come back with results if the log entry has &lt;STRONG&gt;severity=high&lt;/STRONG&gt; and the IP address also exists in this database.&lt;/P&gt;

&lt;P&gt;So the question is, how to do that, both in terms of where the information goes on the system, and in terms of using it in a search.&lt;/P&gt;

&lt;P&gt;My initial thought was to export it as a list and then somehow use the lookup command, but looking at the docs it looks like lookup tables are expected to be CSV rows.&lt;/P&gt;

&lt;P&gt;Any good ideas about how to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 19:46:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342677#M101504</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2018-03-08T19:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342678#M101505</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Step One: Create and upload lookup file&lt;/STRONG&gt;&lt;BR /&gt;
For your purposes, you can turn that list into a CSV by ensuring you have one IP address per line and prepending a header row by adding a single row at the top of the file containing the name you'd like to call that field - something like &lt;CODE&gt;ip&lt;/CODE&gt;, probably. Save the file with a &lt;CODE&gt;.csv&lt;/CODE&gt; extension, and then use the Splunk UI to add it as a Lookup table file: &lt;CODE&gt;Settings &amp;gt; Lookups &amp;gt; Lookup table files &amp;gt; Add new&lt;/CODE&gt;. Upload the file into the app in which you plan to use it, and remember the name you give it (the name should end in .csv). Let's say you named it &lt;CODE&gt;campus_ips.csv&lt;/CODE&gt; so I can reference it later.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step Two: Use lookup in search&lt;/STRONG&gt;&lt;BR /&gt;
If you want to use the list of IP addresses as a search filter across your Palo Alto logs and retain only events from those IPs whose severity=high, then this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="something palo alto" sourcetype="something palo alto" severity=high
[| inputlookup campus_ips.csv 
 | fields ip
 | format ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Mar 2018 19:57:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342678#M101505</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-08T19:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342679#M101506</link>
      <description>&lt;P&gt;I was going to say this does not work, but then I realized that the search that comes back from the sub-search is going to be &lt;CODE&gt;ip=xxx.xxx.xxx.y OR ip=xxx.xxx.xxx.z&lt;/CODE&gt; and so if there is no field called &lt;CODE&gt;ip&lt;/CODE&gt; it fails. I added a rename to it to rename &lt;CODE&gt;ip&lt;/CODE&gt; as &lt;CODE&gt;dest_ip&lt;/CODE&gt; and that did work.&lt;/P&gt;

&lt;P&gt;So, here is the next thing... can I update the .csv file without restarting splunk and have it reflect in the searches, or am I going to have to schedule a restart or reload every time I've got to update the file?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 22:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342679#M101506</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2018-03-08T22:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342680#M101507</link>
      <description>&lt;P&gt;You do not have to restart Splunk when you upload a lookup. I’m curious to understand why you are restarting Splunk. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 23:12:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342680#M101507</guid>
      <dc:creator>damiensurat</dc:creator>
      <dc:date>2018-03-08T23:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342681#M101508</link>
      <description>&lt;P&gt;One last note, you can invest data from sql into Splunk via the dbconnect app.  Or perhaps write a custom command that connects to the database to pull back information without indexing the data into Splunk. This can be done leveraging python in Splunk. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 23:15:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342681#M101508</guid>
      <dc:creator>damiensurat</dc:creator>
      <dc:date>2018-03-08T23:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342682#M101509</link>
      <description>&lt;P&gt;I did not restart Splunk when I created the .csv table. I used &lt;CODE&gt;Settings &amp;gt; Lookups &amp;gt; Lookup table files &amp;gt; Add new&lt;/CODE&gt; as you suggested. But I didn't know what is involved with updating it. It must reload each time it is accessed then, so I can just re-write it. Why I asked about that.&lt;/P&gt;

&lt;P&gt;On this comment about pulling back information by leveraging python in Splunk, is there any documentation on this, or an existing example somewhere?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 23:39:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342682#M101509</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2018-03-08T23:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342683#M101510</link>
      <description>&lt;P&gt;The most common ways people incorporate python into Splunk are by writing custom search commands or external lookups. Do you have a use case? If you describe it, I'm happy to help you figure out the best way to approach it. &lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 00:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342683#M101510</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-09T00:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342684#M101511</link>
      <description>&lt;P&gt;The current loose plan is to have the person who created the software to input to and display from the database write a utility that runs on that system anytime an IP address is changed, added or deleted, which will then do an export of the IPs to a file.&lt;/P&gt;

&lt;P&gt;From this point, we could have that utility scp the file to a drop-off point (say /tmp) on the search head, Then we need something on the search head (perhaps a cron job running under user Splunk) to update the .csv lookup file in /opt/splunk/etc/search/lookups.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 16:31:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342684#M101511</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2018-03-09T16:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342685#M101512</link>
      <description>&lt;P&gt;If the lookup has more than a couple hundred entries do not do the sub search method. use the pattern. Or if you are doing a NOT exclusion.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="something palo alto" sourcetype="something palo alto" severity=high | lookup campus_ips.csv ip AS dest_ip OUTPUTNEW dest_ip AS isFound | where isnotnull(isFound)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Mar 2018 17:49:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342685#M101512</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2018-03-09T17:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342686#M101513</link>
      <description>&lt;P&gt;This works dandy if I change 'OUTPUT dest_ip AS isFound' to &lt;CODE&gt;OUTPUTNEW ip AS isFound&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Using dest_ip there I get this:&lt;/P&gt;

&lt;P&gt;Error in 'lookup' command: Could not find all of the specified destination fields in the lookup table.&lt;/P&gt;

&lt;P&gt;I'd much rather use this than a sub-search. That's a great suggestion -- thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 19:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342686#M101513</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2018-03-09T19:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make use of a list of IP addresses for servers which have sensitive information in a Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342687#M101514</link>
      <description>&lt;P&gt;Yeah, great point, @starcher. As is so often true with Splunk, the "correct" approach will change based on data size/types, and you'll be best off testing a few different routes and seeing which one fits your environment best.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 19:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-make-use-of-a-list-of-IP-addresses-for-servers/m-p/342687#M101514</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-09T19:16:57Z</dc:date>
    </item>
  </channel>
</rss>

