Git Product home page Git Product logo

cloud-forensics-utils's Introduction

Cloud Forensics Utils

This repository contains some tools to be used by forensics teams to collect evidence from cloud platforms. Currently, Google Cloud Platform, Microsoft Azure, and Amazon Web Services are supported.

It consists of one module called libcloudforensics which implements functions that can be desirable in the context of incident response in a cloud environment, as well as a CLI wrapper tool for these functions.

Documentation can be found on the ReadTheDocs page.

Quick access:

cloud-forensics-utils's People

Contributors

aarontp avatar binglot avatar dependabot[bot] avatar dfjxs avatar dianakramer avatar digitalisx avatar fryyyyy avatar giovannt0 avatar greenstorm-code avatar hacktobeer avatar jaegeral avatar jleaniz avatar jonathan-greig avatar ramo-j avatar rgayon avatar sa3eed3ed avatar tomchop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-forensics-utils's Issues

GCP internal refactor

As discussed, let's break down the compute.py module into more granular modules so that we are closer to the orginal API: compute.disk, compute.instance ...

Pull system logs from machines

Explore possibilities of retrieving system logs (e.g. /var/log/syslog) and other comon logs directly from libcloudforensics

Fix disk name creation

There's a bug in GoogleCloudProject.crreate_disk_from_snapshot() with the disk's name creation. If the project name and the instance name are long strings, then truncate_at becomes negative and the resulting disk_name that is created may end up being longer than 63 chars. Additionally, len(project_id) should not be taken out of truncate_at since the project id itself is not used in the disk name.

The disk name creation code should be factored out of this method, and unit tested separately.

Make YAPF use one parameter per line

YAPF should put every function parameter on a separate line for readability.
Add below to YAPF style file and create a separate re-style PR for all code.

SPLIT_ALL_COMMA_SEPARATED_VALUES = True

AWSProject

  • Class to interact with AWSProjects
  • Unit tests

Refactor attach_volume in StartAnalysisVm() methods

The idea is to pass a list of strings to StartAnalysisVm() for the attach_volume / attach_disk parameter instead of an AWSVolume or a GoogleComputeDisk object. The list of strings would ideally be a list of volume IDs/names to attach. This will make StartAnalysisVm() more flexible (e.g. if wanting to use these methods in the CLI tool without defining volumes/disks in the first place)

Refactor try/except blocks in AWS

Make sure try/except blocks only contain code useful in the context of the boto3 API calls and catch both client / waiter exceptions.

Add E2E tests

Hijack the plaso-ci platform maybe? And have a script to test the "making a copy of a live VM and attach it to a new forensics instance"

Implement log acquisition

Have the ability to pass log queries in raw to be able to create very specific recipes.

Be able to pull cloud logs:

  • pull logs of a specific host
  • pull logs of the project in general
  • pull logs related to specific areas (eg authentication)

Error when snapshot can't complete correctly

$ python -m examples.aws_cli copyvolume --volume_id=VOLUMEID --src_account=default --dst_account=blah us-east-2a
Starting volume copy...
 
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/google/home/mbrannock/virtualenv/cloud-forensics-utils/examples/aws_cli.py", line 106, in <module>
    parsed_args.func(parsed_args)
  File "/usr/local/google/home/mbrannock/virtualenv/cloud-forensics-utils/examples/aws_cli.py", line 34, in CreateVolumeCopy
    src_account=args.src_account, dst_account=args.dst_account)
  File "/usr/local/google/home/mbrannock/virtualenv/cloud-forensics-utils/libcloudforensics/aws.py", line 1272, in CreateVolumeCopy
    snapshot, volume_name_prefix='evidence')
  File "/usr/local/google/home/mbrannock/virtualenv/cloud-forensics-utils/libcloudforensics/aws.py", line 427, in CreateVolumeFromSnapshot
    snapshot, volume_name_prefix=volume_name_prefix)
  File "/usr/local/google/home/mbrannock/virtualenv/cloud-forensics-utils/libcloudforensics/aws.py", line 670, in _GenerateVolumeName
    volume_name_prefix, snapshot.name[:truncate_at], volume_id_crc32)
TypeError: 'NoneType' object is not subscriptable

Add more e2e tests for AWS

With new capabilities brought by #70 and #119 and seeing how granular AWS IAM permissions can get when it comes to identifying the minimum set of required permissions to use the CreateVolumeCopy() functionality in different scenarios, we need more e2e tests that verify these scenarios:

  • Boot volume copy
  • Specific volume copy
  • Bootstrap VM
  • Volume copy in a different zone
  • Encrypted volume copy
  • Encrypted volume copy in a different zone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.