Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS Logs Forensics and Incident Response

AWS Logs Forensics and Incident Response

chriscado

April 13, 2023
Tweet

More Decks by chriscado

Other Decks in Technology

Transcript

  1. What is Cloud Trail? https://docs.aws.amazon.com/IAM/latest/UserGuide/security-logging-and-monitoring.html AWS CloudTrail AWS CloudTrail is

    a service that enables you to log, continuously monitor, and retain account activity related to actions across your AWS infrastructure. You can use CloudTrail to identify who or what took which action, what resources were acted upon, when the event occurred, and other details to help you analyze and respond to activity in your AWS account.
  2. What is CloudWatch? https://docs.aws.amazon.com/IAM/latest/UserGuide/security-logging-and-monitoring.html Amazon CloudWatch monitors your AWS resources

    and the applications that you run on AWS in real time. You can collect and track metrics, create customized dashboards, and set alarms that notify you or take actions when a specified metric reaches a threshold that you specify. For example, you can have CloudWatch track CPU usage or other metrics of your Amazon EC2 instances and automatically launch new instances when needed. Amazon CloudWatch Logs helps you monitor, store, and access your log files from Amazon EC2 instances, CloudTrail, and other sources. CloudWatch Logs can monitor information in the log files and notify you when certain thresholds are met. You can also archive your log data in highly durable storage.
  3. CloudWatch vs CloudTrail? CloudWatch CloudTrail Performance Monitoring Auditing Log events

    across AWS Services - operations Log API activity across AWS Services - Activities Higher Level Monitoring Lower Level Granular Data
  4. ELB Logs https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html https 2018-07-02T22:23:00.186641Z app/my-loadbalancer/50dc6c495c0c9188 192.168.131.39:2817 10.0.0.1:80 0.086 0.048

    0.037 200 200 0 57 "GET https://www.example.com:443/ HTTP/1.1" "curl/7.46.0" ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067 "Root=1-58337281-1d84f3d73c47ec4e58577259" "www.example.com" "arn:aws:acm:us-east-2:123456789012:certificate/12345678-1234-1234-1234-123456789012" 1 2018-07-02T22:22:48.364000Z "authenticate,forward" "-" "-" "10.0.0.1:80" "200" "-" "-"
  5. Searching logs with… Athena CREATE EXTERNAL TABLE IF NOT EXISTS

    elb_logs_raw_native ( request_timestamp string, request_ip string, request_port int, backend_ip string, backend_port int, …) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe' WITH SERDEPROPERTIES ( 'serialization.format' = '1','input.regex' = '([^ ]*) ... ([A-Za-z0-9.-]*)$' ) LOCATION 's3://athena-examples/elb/raw/'; SELECT * FROM elb_logs_raw_native WHERE elb_response_code = '200' LIMIT 100;
  6. Cado Response Free 14-day trial Receive unlimited access to the

    Cado Response Platform for 14 days. www.cadosecurity.com/free-investigation/