How to pull data from AWS Security Hub using Scheduler?

0

How to pull data from AWS Security hub automatically using a scheduler ? I am doing some analysis I found below : In Security Hub data is in Json format , we don’t have option to do Export to csv/excel ? All Security hub findings/insights are automatically sent to eventbridge ? Is it true ? If yes where can I check the same in eventbridge ? Are there any other options in order to pull data from security hub , every 12 hours automatically. I want to take the data from security hub and pass it to the ETL Process in order to apply some logic on this data ? Is Eventbridge the only and best approach for this ?

1 Answer
2
Accepted Answer

Hello,

Yes, It is a JSON based but it's AWS own format named AWS Security Finding Format (ASFF) It is true for all resources that SecurityHub supports and is able to see. It should be noted that Each Security Hub Findings - Imported event contains a single finding. In order to see those events you'll need to create an EventBridge rule based on the format for each type of event.

Once you have that set up, the event could trigger an automatic action like:

  • Invoking an AWS Lambda function
  • Invoking the Amazon EC2 run command
  • Relaying the event to Amazon Kinesis Data Streams
  • Activating an AWS Step Functions state machine
  • Notifying an Amazon SNS topic or an Amazon SQS queue
  • Sending a finding to a third-party ticketing, chat, SIEM, or incident response and management tool.

In general, EventBridge is the way forward, but rather than using a scheduled based approach you'll need to resort to an event-based one. In order to intercept all findings, instead of rule being triggered by just specific one, you'll need to adjust the filter and essentially create a catch-all rule for SecurityHub which will then trigger your ETL job. The filter in the rule would look like this:

{ "source": [ "aws.securityhub" ] }

with regard to the ETL, it really depends on your use case, having Kinesis Data Firehose dumping it to S3 and then using Athena as you suggest on your own would work. Another common approach is to send the data to ElasticSearch (or now OpenSearch). You can take the reference of this blog post described them both, you can adjust it based on your needs.

Blog post URL - https://aws.amazon.com/blogs/architecture/visualize-aws-security-hub-findings-using-analytics-and-business-intelligence-tools/

AWS
answered 12 days ago
profile picture
EXPERT
reviewed 12 days ago
profile pictureAWS
EXPERT
reviewed 12 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions