So you'll probably start with the XML looking like this
<QueryList>
<Query Id="0" Path="file://C:\path\to\file.evtx">
<Select Path="file://C:\path\to\file.evtx">*</Select>
</Query>
</QueryList>
You can edit the contents of the select element to include something from the list below.
- SubjectUserSid
- SubjectUserName
- SubjectDomainName
- SubjectLogonId
- TargetUserSid
- TargetUserName
- TargetDomainName
- TargetLogonId
- LogonType
- LogonProcessName
- AuthenticationPackageName
- WorkstationName
- LogonGuid
- TransmittedServices
- LmPackageName
- KeyLength
- ProcessId
- ProcessName
- IpAddress
- IpPort
After the asterix in the above example you can change it to look like this
<QueryList>
<Query Id="0" Path="file://C:\path\to\file.evtx">
<Select Path="file://C:\path\to\file.evtx">
*[EventData[Data[@Name='IpAddress'] and(Data='127.0.0.1')]]
</Select>
</Query>
</QueryList>
This will search all the logs for that specific IP Address.
You can even specify the Event ID
<QueryList> <Query Id="0" Path="file://C:\path\to\file.evtx">
<Select Path="file://C:\path\to\file.evtx"> *[System[(EventID="4771")]] and *[EventData[Data and (Data="username")]] </Select> </Query></QueryList>The Above code will search for that specific event AND one that includes the name USERNAME.
No comments:
Post a Comment