• Stars
    star
    237
  • Rank 168,942 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 8 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Remote Memory Acquisition Tool
https://travis-ci.org/ThreatResponse/margaritashotgun.svg?branch=master

Margarita Shotgun

Python Remote Memory Aquisition

Documentation

Read the full documentation on read the docs.

Quickstart

For more information see the user guide.

Installation

pip install margaritashotgun

Margarita Shotgun is supported on common linux distributions, for other operating systems use the python docker container and follow our installation guide.

See installing for a list of required system packages.

Capture A Single Machine

A single machine can be captured using only the command line arguments for margaritashotgun. First specify the server and user with the --server and --username flags. Next provide a path to an ssh key with --key (or use a password with the --password flag). Finally provide a lime kernel module with --module and specify an output file with --filename

margaritashotgun --server 172.16.20.10 --username root --key root_access.pem --module lime-3.13.0-74-generic.ko --filename 172.16.20.10-mem.lime

Save Memory In S3

To save a file to s3 replace the filename flag with --bucket. Ensure that you have aws credentials configured prior to executing the following command.

margaritashotgun --server 172.16.20.10 --username root --key root_access.pem --module lime-3.13.0-74-generic.ko --bucket memory_capture_bucket``

Capture Multiple Machines

Run margaritashotgun with a configuration file like parallel_config.yml.example

aws:
    bucket: memory_dump_example
hosts:
    - addr:     52.36.191.XXX
      port:     22
      username: ec2-user
      key:      access.pem
      module:   lime-4.1.19-24.31.amzn1.x86_64.ko
    - addr:     52.36.170.XXX
      port:     22
      username: ec2-user
      key:      access.pem
      module:   lime-4.1.19-24.31.amzn1.x86_64.ko
    - addr:     52.36.210.XXX
      port:     22
      username: ubuntu
      key:      dev.pem
      module:   lime-3.13.0-74-generic.ko
    - addr:     52.36.90.XXX
      port:     22
      username: ubuntu
      key:      dev.pem
      module:   lime-3.13.0-74-generic.ko
workers: 2

Here parallelism is limited to 2 workers.

Run the capture with:

margaritashotgun --config your_custom_config.yml.

License

The MIT License (MIT)

Copyright (c) 2016 Joel Ferrier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

aws_ir

Python installable command line utiltity for mitigation of host and key compromises.
Python
340
star
2

ThreatPrep

Python module for evaluation of AWS account best practices around incident handling readieness.
Python
54
star
3

mad-king

Proof of Concept Zappa Based AWS Persistence and Attack Platform
Python
37
star
4

aws_ir_plugins

Core incident handling plugins for aws_ir cli, incident pony, and more.
Python
21
star
5

poor-webhook

An example of a vulnerable slack bot that runs in AWS lambda.
Python
19
star
6

threatresponse_web

Web based analysis platform for use with the AWS_IR command line tool.
CSS
17
star
7

lime-compiler

WIP compiler for lime kernel modules
Ruby
9
star
8

packer-threatresponse_workstation

Packer build of the ThreatResponse AMI
8
star
9

serverless-observatory

A zappa project for scoring output of threatresponse serverless profilers.
Python
6
star
10

python-lambda-inspector

A profiler for the lambda sandbox.
Python
6
star
11

defense-against-the-dark-arts

Defense against the dark arts blog series code.
Python
5
star
12

serverless-vulnerable-azure

A vulnerable app for Azure functions
JavaScript
5
star
13

whitepaper

The whitepaper for the ThreatResponse talk
5
star
14

compose-build_lime_modules

Docker Compose project for automating building LiME modules for available OS and headers.
3
star
15

threatresponse.cloud

middleman generated site
CSS
3
star
16

node-lambda-inspector

A profiler for the lambda sandbox.
JavaScript
3
star
17

docker-centoslatest_lime

A Dockerfile for building the latest variant of lime kernel modules on CentOS:Latest
3
star
18

aws_ir-api

A chalice API gateway wrapper around aws_ir. **Highly experimental**
Python
2
star
19

threatresponse-bsides

CSS
2
star
20

docker-ubuntu_lime

A Dockerfile for building all variants of lime kernel modules on Ubuntu 14.04
2
star
21

ansible-edda

Edda ansible playbooks for ThreatResponse supported AMI.
2
star
22

bad-repo

Demonstration repository.
Python
1
star
23

derbycon-preso

CSS
1
star
24

hovercraft-template

CSS
1
star
25

auth0-rules

Reference rules for integration for auth0.
HTML
1
star
26

docker-centos6_lime

A Dockerfile for building the latest variant of lime kernel modules on CentOS:6.7
1
star
27

csharp-lambda-inspector

A profiler for the lambda sandbox.
C#
1
star
28

serverless-showdown-api

Python
1
star
29

docker-debian_lime

A Dockerfile for building all variants of lime kernel modules on Debian:Jessie
1
star