<?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: Copy and Paste search string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393774#M171012</link>
    <description>&lt;P&gt;@daviess158 which is the field that will give you unique filename?&lt;/P&gt;

&lt;P&gt;Instead of writing the append (which will have subsearch limitation you can just bring the data from index for both Read and Write access&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=windowslogindex EventCode=4663 AND Object_Type=File (Accesses="ReadData (or ListDirectory)" OR Accesses="WriteData (or AddFile)")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then if the file name fields is &lt;CODE&gt;filename&lt;/CODE&gt;(provide the actual file name field based on your indexed data)  for example you can get the Access Types using stats command. Finally through a search find out events which have both Read and Write access.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values(Accesses) as Accesses by filename
| search Accesses="ReadData (or ListDirectory)" AND Accesses="WriteData (or AddFile)")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere example based on Splunk's _internal index&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd component=* (log_level="WARN" OR log_level="ERROR") 
| stats values(log_level) as log_level by component 
| search log_level="WARN" AND Accesses="ERROR"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 Jun 2019 15:42:37 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-06-26T15:42:37Z</dc:date>
    <item>
      <title>Copy and Paste search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393771#M171009</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;
I am trying to create a report which I will use as a dashboard panel, to show me who has been copying and pasting files and folders. I want to know what has been copied and pasted, and where they have been pasted to. So far I have managed to look at all files read and written but I am unable figure out how to close my search down to show me only instances that have both "read" and "write" Accesses, or Is there a better way to do this? My search string in progress is below:&lt;/P&gt;

&lt;P&gt;index=windowslogindex EventCode=4663 AND Object_Type=File Accesses="ReadData (or ListDirectory)" | Append [search index=windowslogindex EventCode=4663 AND Object_Type=File Accesses="WriteData (or AddFile)"]&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393771#M171009</guid>
      <dc:creator>daviess158</dc:creator>
      <dc:date>2020-09-30T00:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copy and Paste search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393772#M171010</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=windowslogindex EventCode=4663 AND Object_Type=File Accesses="ReadData (or ListDirectory)"  OR Accesses="WriteData (or AddFile)" | stats dc(Accesses) as Count by "Insatnce ID or filename"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;now where ever count = 2 those files will have logs for both read and write accesses.&lt;/P&gt;

&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jun 2019 12:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393772#M171010</guid>
      <dc:creator>siddharthkhatsu</dc:creator>
      <dc:date>2019-06-01T12:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Copy and Paste search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393773#M171011</link>
      <description>&lt;P&gt;Hi Sidd&lt;BR /&gt;
Thanks, sorry for the late reply, I haven't been able to get online for a while!&lt;BR /&gt;
I was wondering why the info in the second line was grey'd out, I have tried the string you suggested but nothing comes up in the statistics tab nothing shows.&lt;BR /&gt;
Can you tell me if there is something else I can try? or help me amend the string please?&lt;BR /&gt;
Stu &lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 13:54:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393773#M171011</guid>
      <dc:creator>daviess158</dc:creator>
      <dc:date>2019-06-26T13:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Copy and Paste search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393774#M171012</link>
      <description>&lt;P&gt;@daviess158 which is the field that will give you unique filename?&lt;/P&gt;

&lt;P&gt;Instead of writing the append (which will have subsearch limitation you can just bring the data from index for both Read and Write access&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=windowslogindex EventCode=4663 AND Object_Type=File (Accesses="ReadData (or ListDirectory)" OR Accesses="WriteData (or AddFile)")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then if the file name fields is &lt;CODE&gt;filename&lt;/CODE&gt;(provide the actual file name field based on your indexed data)  for example you can get the Access Types using stats command. Finally through a search find out events which have both Read and Write access.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values(Accesses) as Accesses by filename
| search Accesses="ReadData (or ListDirectory)" AND Accesses="WriteData (or AddFile)")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere example based on Splunk's _internal index&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd component=* (log_level="WARN" OR log_level="ERROR") 
| stats values(log_level) as log_level by component 
| search log_level="WARN" AND Accesses="ERROR"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jun 2019 15:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Copy-and-Paste-search-string/m-p/393774#M171012</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-06-26T15:42:37Z</dc:date>
    </item>
  </channel>
</rss>

