google / cloud-forensics-utils

Python library to carry out DFIR analysis on the Cloud
Apache License 2.0
453 stars 89 forks source link

AWS: Copy an EBS snapshot into S3 #323

Closed ramo-j closed 3 years ago

ramo-j commented 3 years ago

Feature: Forensics method to copy an EBS snapshot into S3.

AWS doesn't support this operation natively. As such, it requires that a volume is created from the specified snapshot which is attached to an instance. This instance performs a dc3dd copy on the volume to create the image and a hash into S3, which is done performed using a userdata launch script. This instance requires an instance profile with certain permissions, so some IAM functions have also been created here.

codecov-commenter commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@ccf8797). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #323   +/-   ##
=======================================
  Coverage        ?   60.72%           
=======================================
  Files           ?       34           
  Lines           ?     2635           
  Branches        ?        0           
=======================================
  Hits            ?     1600           
  Misses          ?     1035           
  Partials        ?        0           
Flag Coverage Δ
nosetests 60.72% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ccf8797...d19ba37. Read the comment docs.

tomchop commented 3 years ago

Also, have we considered using this? https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSnapshot.html

ramo-j commented 3 years ago

OOB discussion - Need to add an (optional) teardown of the IAM perms created, if the user did not provide an existing role