Use raw log scan to search logs

Supported in:

When you perform a search, Google Security Operations first examines the security data that has been ingested, parsed, and normalized. If the information isn't found in the normalized data, you can use Raw log scan to examine the raw, unparsed logs. You can also use regular expressions to examine the raw logs in more detail.

You can use Raw log scan to investigate artifacts that appear in logs (but aren't indexed), including:

  • Usernames
  • Filenames
  • Registry keys
  • Command-line arguments
  • Raw HTTP request-related data
  • Domain names based on regular expressions
  • Asset namespaces and addresses

Raw log scan

To use Raw log scan, enter a search string in the Search field on either the landing page or the menu bar (for example, an MD5 hash). Enter at least 4 characters (including wildcards). If Google SecOps cannot find the search string, it opens the Raw logs scan option. Specify the Start Time and End Time (the default is 1 week) and click Search.

Events associated with the search string are displayed. You can open the associated raw log by clicking the arrow button.

You can also click the Log sources menu and select one or more of the data sources you're searching. The default setting is All.

Regular expressions

You can use regular expressions in Google SecOps to search for and match sets of character strings in your security data. Regular expressions help to narrow your search using fragments of information rather than requiring an exact match.

To run a search using regular expression syntax:

  1. In the Search field, enter a regular expression. Your regular expression must be 4 to 66 characters long.
  2. Select the Run query as regex checkbox and click Search.

The Google SecOps regular expression infrastructure is based on Google RE2, an open-source regular expression engine. Google SecOps uses the same regular expression syntax.

The following table highlights some of the common regular expression syntaxes you can use for your searches.

Any character .
x number of any characters {x}
Character class [xyz]
Negated character class [^xyz]
Alphanumeric (0-9A-Za-z) [[:alnum:]]
Alphabetic (A-Za-z) [[:alpha:]]
Digits (0-9) [[:digit:]]
Lower case (a-z) [[:lower:]]
Upper case (A-Z) [[:upper:]]
Word characters (0-9A-Za-z_) [[:word:]]
Hex digit (0-9A-Fa-f) [[:xdigit:]]
Question mark symbol (?) Matches zero or one occurrence of the preceding element.
Asterisk (*) Matches zero or more occurrences of the preceding character or group.
Plus sign (+) Matches one or more occurrences of the preceding character or group.

The following examples illustrate how you can use regular expressions to search data:

  • goo.le\.com—Matches any string that starts with goo, followed by any single character, followed by le.com, such as google.com or go0le.com.
  • goo\w{3}\.com—Matches strings that start with goo, followed by exactly three word characters (\w), and ending with .com. Examples include google.com, goojle.com, or goodle.com.
  • [[:digit:]]\.[[:alpha:]]—matches a string that has a single digit, followed by a dot (.), followed by a single alphabetic character, such as 34323.system, 23458.office, or 897.net.

Sample regular expressions to search for Windows logs

This section provides regular expression query strings you can use with Google SecOps Raw log scan to find commonly monitored Windows events. These examples assume the Windows log messages are in JSON format.

For more information about commonly monitored Windows Event IDs, see the Events to Monitor topic in Microsoft documentation. The examples provided follow a similar pattern, described in these use cases.

Use Case: Return events with the EventID 1150
Regex String: \"EventID\"\:\s*1150
Values Matched: "EventID":1150
Use Case:Return events with an Event ID that is either 1150 or 1151
Regex String (?:\"EventID\"\:\s*)(?:1150|1151)
Values Matched "EventID":1150 and "EventID":1151
Use Case: Return events with an Event ID that is either 1150 or 1151, and with ThreadID 9092
Regex String (?:\"EventID\"\:\s*)(?:1150|1151).*(?:\"ThreadID\"\:\s*9092)
Values Matched "EventID":1150 <...any number of characters...> "ThreadID":9092
and
"EventID":1151 <...any number of characters...> "ThreadID":9092

Find account management events

These regular expression query strings identify common account management events using the EventID attribute.

Type of Event Regular Expression
User Account Created "EventID\"\:\s*4720
User Account Enabled "EventID\"\:\s*4722
User Account Disabled "EventID\"\:\s*4725
User Account Deleted "EventID\"\:\s*4726
User Rights Modification "EventID\"\:\s*4703
Member Added to Security Enabled Global Group "EventID\"\:\s*4728
Member Removed from Security Enabled Global Group "EventID\"\:\s*4729
Security Enabled Global Group was Deleted "EventID\"\:\s*4730

Find logon success events

These regular expression query strings identify types of successful logon events using the EventID and LogonType attributes.

Type of Event Regular Expression
Logon Success "EventID\"\:\s*4624
Logon Success - Interactive (LogonType=2) "EventID\"\:\s*4624.*?LogonType\"\:\s*\"2\"
Logon Success - Batch Login (LogonType=4) "EventID\"\:\s*4624.*?LogonType\"\:\s*\"4\"
Logon Success - Service Login (LogonType=5) "EventID\"\:\s*4624.*?LogonType\"\:\s*\"5\"
Logon Success - RemoteInteractive Login (LogonType=10) "EventID\"\:\s*4624.*?LogonType\"\:\s*\"10\"
Logon Success - Interactive, Batch, Service, or RemoteInteractive (?:"EventID\"\:\s*4624.*?LogonType\"\:\s*\")(?:2|4|5|10)\"

Find logon failure events

These regular expression query strings identify types of failed logon events using the EventID and LogonType attributes.

Type of Event Regular Expression
Logon Failure "EventID\"\:\s*4625
Logon Failure - Interactive (LogonType=2) "EventID\"\:\s*4625.*?LogonType\"\:\s*\"2\"
Logon Failure - Batch Login (LogonType=4) "EventID\"\:\s*4625.*?LogonType\"\:\s*\"4\"
Logon Failure - Service Login (LogonType=5) "EventID\"\:\s*4625.*?LogonType\"\:\s*\"5\"
Logon Failure - RemoteInteractive Login (LogonType=10) "EventID\"\:\s*4625.*?LogonType\"\:\s*\"10\"
Logon Failure - Interactive, Batch, Service, or RemoteInteractive (?:"EventID\"\:\s*4625.*LogonType\"\:\s*\")(?:2|4|5|10)\"

Find process, service and task events

These regular expression query strings identify certain process and service events using the EventID attribute.

Type of Event Regular Expression
Process Start "EventID\"\:\s*4688
Process Exit "EventID\"\:\s*4689
Service Installed "EventID\"\:\s*4697
New Service Created "EventID\"\:\s*7045
Schedule Task Created "EventID\"\:\s*4698

These regular expression query strings identify different types of process and service related events using the EventID attribute.

Type of Event Regular Expression
Audit Log Cleared "EventID\"\:\s*1102
Object Access Attempted "EventID\"\:\s*4663
Share Accessed "EventID\"\:\s*5140

Need more help? Get answers from Community members and Google SecOps professionals.