Skip to main content

A python module for orchestrating content acquisitions and light analysis via amazon ssm.

Project description

ssm-acquire

https://img.shields.io/pypi/v/ssm_acquire.svg Documentation Status

A python module for orchestrating content acquisitions and analysis via amazon ssm. Note: This is a pre-release.

Features

  • Acquire memory from a linux instance to an S3 bucket using SSM.

  • Interrogate an instance for top-10 IOCs using OSQuery and save the jsonified output.

  • Analyze a memory sample on a machine using docker.

  • Create a rekall profile using an instance as a build target running the Amazon SSM Agent.

Usage

Sample Cli Usage

pip install ssm_acquire
Usage: ssm_acquire [OPTIONS]

ssm_acquire a rapid evidence preservation tool for Amazon EC2.

Options:
  --instance_id TEXT  The instance you would like to operate on.
  --region TEXT       The aws region where the instance can be found.
  --build             Specify if you would like to build a rekall profile with
                      this capture.
  --acquire           Use linpmem to acquire a memory sample from the system
                      in question.
  --interrogate       Use OSQuery binary to preserve top 10 type queries for
                      rapid forensics.
  --analyze           Use docker and rekall to autoanalyze the memory capture.
  --deploy            Create a lambda function with a handler to take events
                      from AWS GuardDuty.
  --help              Show this message and exit.

Getting Started

Deploy Responder Role into AWS Account with the CloudFormation Template: cloudformation/responder_role.yml. (Note: this role requires 2FA to assume) This will create a role with the required permissions to run ssm commands on ec2 instances and an s3 bucket to store the memory assets. You will need the bucket name and the ARN of the role in the next step.

Setup a config file in your home directory. It should be named .threatresponse.ini There is a sample config file in conf/settings.ini - it has three required parameters.

  • mfa_serial_number: the serial number for your MFA device for assuming the role.

  • asset_bucket: the name of the bucket to store the assets. This was created in step 1.

  • ssm_acquire_role_arn: the ARN of the Responder Role you created in step 1.

pip install ssm_acquire

To acquire memory and build a rekall profile from an instance:

ssm_acquire --instance_id i-xxxxxxxx --region us-west-2 --build --acquire

You can analyze your memory capture right away with:

ssm_acquire --instance_id i-xxxxxxx --analyze

This will analyze the memory dump with the most common rekall plugins: [psaux, pstree, netstat, ifconfig, pidhashtable] When the analysis is done it will upload the results back to the asset store.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2018-11-10)

  • Initial Commit to Github

0.1.0.4 (2018-11-25)

  • Publish to warehouse for AWS Re: Invent 2018

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssm_acquire-0.1.0.5.linux-x86_64.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

ssm_acquire-0.1.0.5-py2.7.egg (22.9 kB view details)

Uploaded Source

File details

Details for the file ssm_acquire-0.1.0.5.linux-x86_64.tar.gz.

File metadata

  • Download URL: ssm_acquire-0.1.0.5.linux-x86_64.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for ssm_acquire-0.1.0.5.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 39ea49a505317d47dd700b884d3479803c54db9f34853566da9964f497eb8a03
MD5 40e6f65418eac5bf956a5096a04cda34
BLAKE2b-256 edd044a56a1e3825a2e6a12595e2ec74f5d1a7da66537e761cddec5f29763249

See more details on using hashes here.

File details

Details for the file ssm_acquire-0.1.0.5-py2.7.egg.

File metadata

  • Download URL: ssm_acquire-0.1.0.5-py2.7.egg
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for ssm_acquire-0.1.0.5-py2.7.egg
Algorithm Hash digest
SHA256 924a79518b8004e37ee999f266d1cd08bea735c1095f7a7205991310c51e3ec7
MD5 21b0cde6c77f1e86ec51e5371592b93f
BLAKE2b-256 602cea22886f1cebdaca034f0d23ed9585b699af4cdb69f2d3dd15f83cf0318f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page