Git Product home page Git Product logo

byt3bl33d3r / red-baron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coalfire-research/red-baron

363.0 29.0 74.0 28.74 MB

Automate creating resilient, disposable, secure and agile infrastructure for Red Teams

License: GNU General Public License v3.0

HCL 97.64% Shell 2.31% Smarty 0.05%
infrastructure infrastructure-as-code security-tools red-teams terraform terraform-modules security

red-baron's Introduction

Red Baron

baron

Red Baron is a set of modules and custom/third-party providers for Terraform which tries to automate creating resilient, disposable, secure and agile infrastructure for Red Teams.

Third-party Providers

This repository comes with a few pre-compiled Terraform plugins (you can find them under the terraform.d directory), some of these have been modified to better suit the tool:

Author and Acknowledgments

Author: Marcello Salvati (@byt3bl33d3r)

The initial inspiration for this came from @_RastaMouse's excellent 'Automated Red Team Infrastructure Deployment with Terraform' blog posts series:

And @bluscreenofjeff's amazing Red Team Infrastructure Wiki

Both of these resources were referenced heavily while building this.

Setup

Red Baron only supports Terraform version 0.11.0 or newer and will only work on Linux x64 systems.

#~ git clone https://github.com/byt3bl33d3r/Red-Baron && cd Red-Baron
#~ export AWS_ACCESS_KEY_ID="accesskey"
#~ export AWS_SECRET_ACCESS_KEY="secretkey"
#~ export AWS_DEFAULT_REGION="us-east-1"
#~ export LINODE_API_KEY="apikey"
#~ export DIGITALOCEAN_TOKEN="token"
#~ export GODADDY_API_KEY="gdkey"
#~ export GODADDY_API_SECRET="gdsecret"
#~ export ARM_SUBSCRIPTION_ID="azure_subscription_id"
#~ export ARM_CLIENT_ID="azure_app_id"
#~ export ARM_CLIENT_SECRET="azure_app_password"
#~ export ARM_TENANT_ID="azure_tenant_id"

# For Google Cloud Compute see https://www.terraform.io/docs/providers/google/index.html#configuration-reference 
# and set the appropriate environment variable for your use case

# copy an infrastructure configuration file from the examples folder to the root directory and modify it to your needs
#~ cp examples/complete_c2.tf .

#~ terraform init
#~ terraform plan
#~ terraform apply

Tool & Module Documentation

For detailed documentation on the tool and each module please see Red Baron's wiki.

Most of the documentation assumes you are familiar with Terraform itself, Terraform's documentation can be found here.

Known Bugs/Limitations

License

This fork of the original Red Baron repository is licensed under the GNU General Public License v3.0.

red-baron's People

Contributors

af001 avatar byt3bl33d3r avatar jaredhaight avatar mubix avatar sunnyneo 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

red-baron's Issues

Metasploit install rvm issues

Metasploit install script not working with example as user is not root which makes this a single user install according to https://rvm.io/rvm/install this would mean you need to add
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
for it to source properly and re-source the bash profile or run the bash script as root.

This fails the install with

module.http_c2.azurerm_virtual_machine.http-c2 (remote-exec): /tmp/terraform_1736744011.sh: line 9: rvm: command not found
module.http_c2.azurerm_virtual_machine.http-c2 (remote-exec): /tmp/terraform_1736744011.sh: line 10: gem: command not found
module.http_c2.azurerm_virtual_machine.http-c2 (remote-exec): /tmp/terraform_1736744011.sh: line 11: bundle: command not found

Error: Error applying plan:

1 error(s) occurred:

* module.http_c2.azurerm_virtual_machine.http-c2: error executing "/tmp/terraform_1736744011.sh": Process exited with status 127

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

terraform init issues

Whenever I try to run terraform init I get the following error from the complete_c2.tf file :

There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Invalid variable name

on modules/letsencrypt/create-cert-dns/variables.tf line 1, in variable "provider":
1: variable "provider" {

The variable name "provider" is reserved due to its special meaning inside
module blocks.

Terraform v0.12.12

provider and count seems to be reserved keywords on teraform 0.12+. I successfully changed the count variable to something else and also on all the other files and seems to work but I cannot do the same for the variable provider as it seems to be breaking things.

Any help?

Error when trying to run Ansible Playbook

When I add ansible_playbook = "example_playbook.yml" to basic_http_c2_digitalocean.tf.

I get a " Error: module.http_c2.null_resource.ansible_provisioner: : invalid or unknown key: environment" error message?

Error terraform apply

Hello,

When I executed terraform apply XXX , I have the follow error:

Error: Error applying plan:

3 error(s) occurred:

  • module.hash-http-c2.digitalocean_droplet.http-c2: 1 error(s) occurred:

  • digitalocean_droplet.http-c2: Error creating droplet: POST https://api.digitalocean.com/v2/droplets: 401 Unable t o authenticate you.

  • module.dns_c2.digitalocean_droplet.dns-c2 (destroy): 1 error(s) occurred:

  • digitalocean_droplet.dns-c2: Error waiting for droplet to be unlocked for destroy (138760313): Error retrieving d roplet: GET https://api.digitalocean.com/v2/droplets/138760313: 401 Unable to authenticate you.

  • module.dns-rdir.digitalocean_ssh_key.ssh_key: 1 error(s) occurred:

  • digitalocean_ssh_key.ssh_key: Error creating SSH Key: POST https://api.digitalocean.com/v2/account/keys: 401 Unable to authenticate you.

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

I have tried to configure everything from scratch.Has something similar happened to anyone ?

A greeting and thanks

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.