Skip to main content

DynamoEval Logs

  • DynamoEval request involves logs from the API, attack and the test report generation
  • This document would cover how you can view the logs for the DynamoEval attack and the test report generation

Where are we going to view the logs?

  • We’re gonna use AWS Cloudwatch Insights as it offers querying with filters over the logs in AWS Cloudwatch
  • It allows you to search/filter logs in log groups by using a query

Log Group

In order to use Cloudwatch Insights you need to have the log group within which you're gonna search for the logs

  • /dynamofl/application-logs/eks-cluster/default
    • Where eks-cluster is the cluster name. Most likely it would

DynamoEval: Attack Logs

Each DynamoEval test has multiple attacks which is executed on a kubernetes pod

Structured Logging Attributes

We've got a fixed set of attributes that are logged with every log in DynamoEval attack log

Attribute NameValue
log_processed.productdynamoeval
log_processed.componentpentest-attack
log_processed.test_idtest id of the test for which the attack is being performed
log_processed.attack_idId of the attack being performed
log_processed.job_idjob id of the attack
log_processed.loggerThe name of the logger, most likely will be the name of the file. E.g privacy_attacks.pii_leakage.models.huggingLM

How to view the logs?

Steps

  1. Select the Cloudwatch Log Group in the insights dashboard
  2. Select the time range within which you want to check the logs for
  3. Run the following query [make sure to replace the value for log_processed.attack_id in the below query with your attack id]
filter log_processed.product="dynamoeval" | filter log_processed.component="pentest-attack" | filter log_processed.attack_id="664d3a37e75f563c4a4c7903"
| fields @timestamp, log_processed.logger, log_processed.event | sort @timestamp asc

What does it look like?

AWS Cloudwatch Insights

DynamoEval: Test Report Generation Logs

Some of the DynamoEval tests have a test report generation job that gets executed once the test is finished

Structured Logging Attributes

We've got a fixed set of attributes that are logged with every log in Test Report Generation log

Attribute NameValue
log_processed.productdynamoeval
log_processed.componenttest-report-generation
log_processed.test_idtest id of the test for which the attack is being performed
log_processed.job_idjob id of the test report generation
log_processed.loggerThe name of the logger, most likely will be the name of the file.

How to view the logs?

Steps

  1. Select the Cloudwatch Log Group in the insights dashboard
  2. Select the time range within which you want to check the logs for
  3. Run the following query [make sure to replace the value for log_processed.test_id in the below query with your test id]
filter log_processed.product="dynamoeval" | filter log_processed.component="test-report-generation" | filter log_processed.test_id="584d3a37a75f463c4a4c0397"
| fields @timestamp, log_processed.logger, log_processed.event | sort @timestamp asc