<?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 do I search for and combine Windows event pairs (4663 and 4660) that are generated when a file is deleted? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232443#M68945</link>
    <description>&lt;P&gt;What output do you want to see? A list of deleted files? The actual events?&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2015 23:45:47 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2015-11-11T23:45:47Z</dc:date>
    <item>
      <title>How do I search for and combine Windows event pairs (4663 and 4660) that are generated when a file is deleted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232442#M68944</link>
      <description>&lt;P&gt;I want to find exact events that point to a delete file event in Windows share.&lt;/P&gt;

&lt;P&gt;There are two events generated at the same time when you delete a file, with the same "&lt;STRONG&gt;Description code&lt;/STRONG&gt;" , but recorded in sequence in +/- 3 sec time range, first 4663, then 4660. However, their "&lt;STRONG&gt;RecordNumbers&lt;/STRONG&gt;" differ by one. In 4660 a sequence number one greater than that of 4663.&lt;/P&gt;

&lt;P&gt;For instance: &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EVENT #2 4660&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  11/11/2015 03:11:31 PM
  LogName=Security
  SourceName=Microsoft Windows security auditing. 
  EventCode=4660
  RecordNumber=6953203

  Message=Object deleted.

Субъект:     
    Security ID:        MYDOMAIN\UserTest   
    User name:      UserTest    
    Domain:      MYDOMAIN   

Объект:
    Object Server:  Security
Description code:   0x16c8
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;EVENT #1 4663&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  11/11/2015 03:11:31 PM
    LogName=Security
    SourceName=Microsoft Windows security auditing.
    EventCode=4663
    RecordNumber=6953202

    Message=Access to the object.

Субъект:
    Security ID:        MYDOMAIN\UserTest
    User name:      UserTest
    Domain:     MYDOMAIN

Объект:
    Object Server:  Security
    Object type:        File
    Object Name:        D:\share01\support\MyVideos\Race_the_best.avi
    Description code:       0x16c8


Сведения о запросе на доступ:
    Операции доступа:        DELETE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I  find and combine in one all these event pairs, that have occurred in  3 sec time range?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 13:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232442#M68944</guid>
      <dc:creator>DimkoBilanko</dc:creator>
      <dc:date>2015-11-11T13:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for and combine Windows event pairs (4663 and 4660) that are generated when a file is deleted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232443#M68945</link>
      <description>&lt;P&gt;What output do you want to see? A list of deleted files? The actual events?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 23:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232443#M68945</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-11-11T23:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for and combine Windows event pairs (4663 and 4660) that are generated when a file is deleted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232444#M68946</link>
      <description>&lt;P&gt;Yes, I just want to know When-Who-What-Deleted? I want to find and coalesce two event 4663 and 4660 to one IF:&lt;BR /&gt;
1 - they have identical &lt;STRONG&gt;Description code&lt;/STRONG&gt; ("0x16c8" in my example);&lt;BR /&gt;
2 - in event 4660 a &lt;STRONG&gt;RecordNumber&lt;/STRONG&gt; one greater than that of 4663 (4663-6957600 and 4660-6957601);&lt;BR /&gt;
3 - they occured in +/- 3 sec. time range;&lt;/P&gt;

&lt;P&gt;Now I have the table like this:&lt;/P&gt;

&lt;P&gt;1 | 11.11.2015 17:46 | TestUser | 0x16c8 | 4660 | 6957601 | &lt;BR /&gt;
2 | 11.11.2015 17:46 | TestUser | 0x16c8 | 4663 | 6957600 | D:\share01\Race_01.avi | DELETE&lt;/P&gt;

&lt;P&gt;And want to get this:&lt;/P&gt;

&lt;P&gt;11.11.2015 17:46 | TestUser | 0x16c8 | 4663, 4660 | 6957600, 6957601 | D:\share01\Race_01.avi | DELETE&lt;/P&gt;

&lt;P&gt;p.s. Am I the first who want to monitor Windows file shares by Splunk? Because, I didn't find any APPs for it or any info in Splunk wiki...&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 11:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232444#M68946</guid>
      <dc:creator>DimkoBilanko</dc:creator>
      <dc:date>2015-11-12T11:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for and combine Windows event pairs (4663 and 4660) that are generated when a file is deleted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232445#M68947</link>
      <description>&lt;P&gt;Give something like this a try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=WinEventLog:Security EventCode=4660 OR EventCode=4663 | fields EventCode RecordNumber User_Name Object_Name Object_type Description_code | eval RecordNumber = if(EventCode==4660, RecordNumber - 1, RecordNumber) | stats values(Object_Name) as Name Values(Object_type) as Type values(User_Name) as user by RecordNumber Description_code host 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The trick here is subtracting one from the second event's recordnumber so it matches exactly. Alternatively you could do a transaction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=WinEventLog:Security EventCode=4660 OR EventCode=4663 | fields EventCode RecordNumber User_Name Object_Name Object_type Description_code | transaction maxspan=3s host Description_code 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Nov 2015 11:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232445#M68947</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2015-11-12T11:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for and combine Windows event pairs (4663 and 4660) that are generated when a file is deleted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232446#M68948</link>
      <description>&lt;P&gt;I've got it with additional parameter "endswith"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=FileSerevr01 sourcetype="WinEventLog:Security" EventCode = 4663 OR 4660 | transaction Handle_ID Object_Name maxpause=1s endswith="An object was deleted" | table _time, Account Name, Object_Name, Accesses
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Nov 2015 20:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-and-combine-Windows-event-pairs-4663-and/m-p/232446#M68948</guid>
      <dc:creator>DimkoBilanko</dc:creator>
      <dc:date>2015-11-25T20:14:31Z</dc:date>
    </item>
  </channel>
</rss>

