-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTemplateDetection.txt
47 lines (35 loc) · 1.18 KB
/
TemplateDetection.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System.Collections.Generic;
using System.Diagnostics.Eventing.Reader;
namespace KerberosEventKiller
{
public class DETECTION_NAME : BaseDetection
{
public override string eventQueryString { get => "XPATH_QUERY"; }
public override void Check(Dictionary<string, string> args)
{
Output.WriteConsole("[*] Starting SHORT_DETECTION_DESCRIPTION detection");
var tasks = GetReaderTasks(args);
if (null == tasks)
{
return;
}
Output.WriteConsole("");
// do stuff
}
public override List<object> ParseEvents(EventLogReader reader, string dc)
{
var returnedRequests = new List<object>();
int count = 0;
Output.WriteConsole($"[*] Reading events from {dc}");
EventRecord eventRecord = reader.ReadEvent();
while (eventRecord != null)
{
count += 1;
// do stuff
eventRecord = reader.ReadEvent();
}
Output.WriteConsole($"[*] Read {count} events from {dc}");
return returnedRequests;
}
}
}