You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current parser for Google Cloud logs is missing a critical log section, the protoPayload.status. This contains valuable information when present, including why a operation failed.
"status": {
"code": 7,
"message": "Permission 'iam.serviceAccounts.create' denied on resource (or it may not exist).",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "IAM_PERMISSION_DENIED",
"domain": "iam.googleapis.com",
"metadata": {
"permission": "iam.serviceAccounts.create"
}
}
]
}
A great example of this is when a compromised account attempts an operation they do not have permission for. The severity will show "ERROR" in the current parser but it doesn't give any reason why. The original log from GC would have a protoPayload.status.message field that would contain the actual reason, along with a protoPayload.status.details[0].reason field. Both of these fields should be added to parsers/jsonl_plugins/gcp_log.py
To Reproduce:
Create an account in Google Cloud and then perform an action that the account doesn't have permission to perform, such as creating a service account.
Then download the logs with dftimewolf or in the raw JSON format.
Pass the json file to log2timeline.py
Review the json data from the plaso file, the status data is missing
Below is a sample of a message that can be used to test the parsing
Describe the problem:
The current parser for Google Cloud logs is missing a critical log section, the protoPayload.status. This contains valuable information when present, including why a operation failed.
A great example of this is when a compromised account attempts an operation they do not have permission for. The severity will show "ERROR" in the current parser but it doesn't give any reason why. The original log from GC would have a protoPayload.status.message field that would contain the actual reason, along with a protoPayload.status.details[0].reason field. Both of these fields should be added to
parsers/jsonl_plugins/gcp_log.py
To Reproduce:
Create an account in Google Cloud and then perform an action that the account doesn't have permission to perform, such as creating a service account.
Then download the logs with dftimewolf or in the raw JSON format.
Pass the json file to log2timeline.py
Review the json data from the plaso file, the status data is missing
Below is a sample of a message that can be used to test the parsing
Here is example code to add to the parser
I added this to line 133 and tested. The following is the output of the test. Notice that the status_message is populated now.
The text was updated successfully, but these errors were encountered: