[
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/RedinfraCraft_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/RedInfraCraft_Black.png\">\n  <img align=\"center\" alt=\"Mythic_C2\" src=\"assets/RedinfraCraft_White.png\">\n</picture>\n</div>\n\n# Red-Infra-Craft (V2)\n\nWelcome to the **RedInfraCraft (V2)** Tool - your gateway to automating the deployment of robust red team infrastructures! RedInfraCraft is your trusted companion in effortlessly setting up and managing red team infrastructures, streamlining the process so you can focus on your mission. \n\n- Simplifies the deployment 🚀 of Mythic Command and Control (C2) frameworks. \n- Facilitates the creation 🎯 and management of sophisticated phishing and payload setups. \n- Designed 💡 to be intuitive and easy to use, reducing the learning curve for red teamers.  \n- Provides thorough documentation 📚 and guides to assist users at every step.  \n- Supports multi-cloud ☁️ environments, allowing deployments across different cloud providers with flexibility and ease.  \n\nLet's craft infrastructures together with **RedInfraCraft (V2)**!!\n\n<br>\n\n## 1. Prerequisite\n\nTo follow this guide, you'll need to have the following software installed on your machine:\n\n- **Terraform**\n\n  To Download Terraform, you can visit their official website [HashiCorp](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli). They     provide instructions on how to install Terraform on Windows, Linux, and macOS.\n\n- **Python**\n\n  Make sure you have [Python](https://www.python.org/) installed in your system.\n\n- **Cloud Provider Access**\n\n  You should have an active account and proper credentials/license for at least one of the following cloud providers:\n\n  - Amazon Web Services (AWS)\n  - Microsoft Azure\n  - Google Cloud Platform (GCP)\n\n  This guide assumes you have sufficient permissions to create and manage resources within your chosen cloud environment.\n<br>\n\n## 2. RedInfraCraft Tool Installation\nTo acquire the tool, you need to clone this GitHub repository. Paste the below command in your terminal.\n\n> [!IMPORTANT]\n> Make sure you have installed [git](https://git-scm.com/downloads) in your machine\n\n```bash\ngit clone https://github.com/RedTeamOperations/Red-Infra-Craft.git\n```\n<br>\n\n## 3. How to spawn an Infrastructure?\n\nRedInfraCraft enables you to deploy any infrastructure in a single step, automating your tasks efficiently.\n\n<br>\n\n<div align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Common_user1.png\">\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Common_user.png\">\n    <img align=\"center\" alt=\"spawn an Infrastructure\" src=\"assets/Common_user.png\">\n  </picture>\n</div>\n\n### Available Infrastructures:\n\n- **C2:**\n  - Mythic C2 \n  - Mythic C2 with CloudFront and Load Balancer (AWS)\n  - Mythic C2 with Frontdoor and Load Balancer (Azure)\n  - Mythic C2 with Application Load Balancer (GCP)\n- **Payload:**\n  - Pwndrop\n- **Phishing:** \n  - EvilGinx\n  - GoPhish\n- **All in One Infra:** \n  - Mythic C2 with CloudFront and Load Balancer, Pwndrop, EvilGinx, GoPhish.\n  - Mythic C2 with Frontdoor and Load Balancer, Pwndrop, EvilGinx, GoPhish.\n\n### Cloud Providers\n1) AWS\n2) Azure\n3) GCP\n\n### Help Commands:\n\n- To know more about this tool 💡\n  ```bash\n  redinfracraft.py info\n  ```\n  \n- To know about arguments 💡\n  ```bash\n  redinfracraft.py --help\n  ```\n  \n- To view available options 💡\n  ```bash \n  redinfracraft.py help\n  ```\n  \n### Commands to Spawn 🔧 and Destroy 🗑️ Infras:\n\nCommand Explanation:\n  \n  --> redinfracraft.py  action  cloud_provider  infra_type  infra\n    \n- redinfracraft.py  create       aws            c2      mythic\n    \n- redinfracraft.py  destroy      azure          c2      mythic\n    \n- redinfracraft.py  create       gcp            c2      mythic\n\n\nFor the step-by-step guide to spawn/destroy Infra go to [infra_deployment_guide](https://github.com/RedTeamOperations/Red-Infra-Craft/tree/main/infra_deployment_guide)\n\n  | Infrastructure | Cloud Provider | Command | Description |\n  | ----- | - | -------------- | ------ |\n  | Mythic C2 | AWS | redinfracraft.py create/destroy aws c2 mythic | To Create/destroy Mythic C2 infrastructure. | \n  | Mythic C2 | Azure | redinfracraft.py create/destroy azure c2 mythic | To Create/destroy Mythic C2 infrastructure. | \n  | Mythic C2 | AWS | redinfracraft.py create/destroy aws c2 mythic_lb | To Create/destroy Mythic C2 with ELB & CloudFront infrastructure. | \n  | Mythic C2 | Azure | redinfracraft.py create/destroy azure c2 mythic_lb | To Create/destroy Mythic C2 with ELB & Frontdoor infrastructure. | \n  | Mythic C2 | GCP | redinfracraft.py create/destroy gcp c2 mythic_lb | To Create/destroy Mythic C2 with ALB infrastructure. | \n  | Payload | AWS | redinfracraft.py create/destroy aws payload pwndrop | To Create/destroy pwndrop payload infrastructure. | \n  | Payload | Azure | redinfracraft.py create/destroy azure payload pwndrop | To Create/destroy pwndrop payload infrastructure. | \n  | Phishing | AWS | redinfracraft.py create/destroy aws phishing gophish | To Create/destroy Gophish phishing infrastructure. |\n  | Phishing | Azure | redinfracraft.py create/destroy azure phishing gophish | To Create/destroy Gophish phishing infrastructure. |\n  | Phishing | AWS | redinfracraft.py create/destroy aws phishing evilginx | To Create/destroy Evilginx phishing infrastructure. |\n  | Phishing | Azure | redinfracraft.py create/destroy azure phishing evilginx | To Create/destroy Evilginx phishing infrastructure. |\n  | All-in-one | AWS | redinfracraft.py create/destroy aws full_infra | To Create/destroy all infrastructures in one go (Mythic C2 with CloudFront and Load Balancer, Payload, Phishing). |\n  | All-in-one | Azure | redinfracraft.py create/destroy azure full_infra | To Create/destroy all infrastructures in one go (Mythic C2 with Frontdoor and Load Balancer, Payload, Phishing). |\n\n<br>\n\n## 4. Cost & Specification Overview (Cloud Resources)\n\n### 1. AWS \n\n\n  | Resources | Details |\n  | ------ | ------------ |\n  | EC2 Instance\t | t2.medium (2 vCPU, 4 GB RAM) - Ubuntu AMI: ami-080e1f13689e07408 |\n  | Volume (Root Block Device)\t | 20 GB (gp2 EBS)|\n  | Security Groups\t | \t1) \"Terra_Ec2_sg: Allows SSH (22), HTTP (80) from ELB\" 2) \"terraElbSg: Allows HTTP (80)\" |\n  | Key Pair | RSA 4096-bit key pair generated via Terraform |\n  | Application Load Balancer (ALB) | Internet-facing, HTTP only, with target group |\n  | Target Group | HTTP on port 80, attached to EC2 instance |\n  | CloudFront | CDN distribution pointing to the ALB |\n  | VPC & Subnets | Using default VPC and multiple subnets |\n  | Data sources used\t | 1) Public IP fetch (ipify), 2) AWS VPC, 3) Subnets in selected AZs |\n  \nTotal Estimated Cost: $4.20/day  \n* Actual CloudFront + data transfer may vary with usage and traffic  \n\n### 2. Azure \n\n  | Resources | Details |\n  | ------ | ------------ |\n  | VM\t | Ubuntu 18.04, size: Standard_B1ms, SSH only, User: azureuser |\n  | NIC | Connected to subnet & public IP: Dynamic IP, DNS label hardcoded |\n  | NSG | Rules for HTTP, HTTPS (from AzureFrontDoor), SSH (from any) |\n  | SSH Key\t | RSA 4096-bit key pair generated locally |\n  | Frontdoor | Origin, Origin Group, Front Door Endpoint, Front Door Route |\n\nTotal Estimated Cost: $3.74/day  \n* This assumes light/moderate usage, 1 VM, and no additional premium services (like WAF, Private Link, or DDoS Protectio, actual cost may vary\n\n### 3. GCP\n\n  | Resources | Details |\n  | ------ | ------------ |\n  | Compute Instance\t | Machine: n2-standard-2, OS: Debian 11, Public IP: Ephemeral, Scratch Disk: NVMe, Instance Group |\n  | Firewall Rule | Allow: TCP 80 , Allow: TCP 443, Allow: TCP 80/443 Sources: GCP Health Check IP ranges |\n  | Load Balancer | Global IP Address, Health Check, Frontend Service, Backend Service, URL Map, HTTP Proxy |\n\nTotal Estimated Cost: $5.6/day   \n* actual cost may vary\n\n<br>\n\n## Learning Content\n\nIf you want to learn more, please refer to this content:\n\n\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Certification1.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Certifications.png\">\n  <img align=\"center\" alt=\"Certifications\" src=\"assets/Certifications.png\">\n</picture>\n</div>\n\n- Red Team Infra Dev [[CRT-ID](https://cyberwarfare.live/product/red-team-infra-developer/)]\n- Multi-Cloud Red Team Analyst [[MCRTA](https://cyberwarfare.live/product/multi-cloud-red-team-analyst-mcrta/)]\n- Hybrid Multi-Cloud Red Team Specialist [[CHMRTS](https://cyberwarfare.live/product/hybrid-multi-cloud-red-team-specialist-chmrts/)]\n\n<br>\n\n## Future Releases\nOur tool now supports a multi-cloud environment, seamlessly operating across AWS, Microsoft Azure, and Google Cloud Platform (GCP). This broad support ensures maximum flexibility, allowing users to integrate the tool into their preferred cloud infrastructure with ease.\n\nBut we’re just getting started.\n\nIn upcoming releases, we plan to introduce new cloud-native architectures and additional Command and Control (C2) mechanisms across all supported platforms. These enhancements will further strengthen the tool's capabilities for cloud security operations, offering deeper insights and more powerful features for both offensive and defensive use cases.\n\nStay tuned as we continue to innovate and expand our tool to meet the evolving needs of the cloud security community.\n\n<br>\n\n## Your Feedback\n\nWe highly value your feedback, as it plays a crucial role in the continuous development of RedInfraCraft. Your suggestions and comments are invaluable in further enhancing the tool. Please don't hesitate to share your thoughts either by creating an Issue or reaching out to us via email at [info@cyberwarfare.live](mailto:info@cyberwarfare.live) with the subject **RedInfraCraft**.\n"
  },
  {
    "path": "html/EvilGinx.html",
    "content": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Asciinema Demo</title>\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/css/asciinema-player.css\">\r\n</head>\r\n<body>\r\n    <h1>Infra Deployment Demo</h1>\r\n    <asciinema-player src=\"https://asciinema.org/a/ghmEEERKAfjkleV46XqYWmpoQ.cast\" autoplay=\"true\" loop=\"true\"></asciinema-player>\r\n    <script src=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/js/asciinema-player.js\"></script>\r\n</body>\r\n</html>"
  },
  {
    "path": "html/Full_Infra.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Asciinema Demo</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/css/asciinema-player.css\">\n</head>\n<body>\n    <h1>Infra Deployment Demo</h1>\n    <asciinema-player src=\"https://asciinema.org/a/8R3ryvdt3zuJfS3FBX0TdFuXt.cast\" autoplay=\"true\" loop=\"true\"></asciinema-player>\n    <script src=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/js/asciinema-player.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "html/GoPhish.html",
    "content": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Asciinema Demo</title>\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/css/asciinema-player.css\">\r\n</head>\r\n<body>\r\n    <h1>Infra Deployment Demo</h1>\r\n    <asciinema-player src=\"https://asciinema.org/a/n7w974BlUBNeTMTLxGMb21NYd.cast\" autoplay=\"true\" loop=\"true\"></asciinema-player>\r\n    <script src=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/js/asciinema-player.js\"></script>\r\n</body>\r\n</html>"
  },
  {
    "path": "html/Mythic_C2.html",
    "content": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Asciinema Demo</title>\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/css/asciinema-player.css\">\r\n</head>\r\n<body>\r\n    <h1>Infra Deployment Demo</h1>\r\n    <asciinema-player src=\"https://asciinema.org/a/688653.cast\" autoplay=\"true\" loop=\"true\"></asciinema-player>\r\n    <script src=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/js/asciinema-player.js\"></script>\r\n</body>\r\n</html>"
  },
  {
    "path": "html/Mythic_C2_with_ELB.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Asciinema Demo</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/css/asciinema-player.css\">\n</head>\n<body>\n    <h1>Infra Deployment Demo</h1>\n    <asciinema-player src=\"https://asciinema.org/a/nsKnuaHiweu7euvhBPwcfpJL8.cast\" autoplay=\"true\" loop=\"true\"></asciinema-player>\n    <script src=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/js/asciinema-player.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "html/pwndrop.html",
    "content": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Asciinema Demo</title>\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/css/asciinema-player.css\">\r\n</head>\r\n<body>\r\n    <h1>Infra Deployment Demo</h1>\r\n    <asciinema-player src=\"https://asciinema.org/a/oKih2dKeQ3GwCfyipkiCwHWdZ.cast\" autoplay=\"true\" loop=\"true\"></asciinema-player>\r\n    <script src=\"https://cdn.jsdelivr.net/npm/asciinema-player@2.6.1/resources/public/js/asciinema-player.js\"></script>\r\n</body>\r\n</html>"
  },
  {
    "path": "infra_deployment_guide/AWS/assets/test",
    "content": "\n"
  },
  {
    "path": "infra_deployment_guide/AWS/readme.md",
    "content": "#  Infrastructure Walkthroughs:\n\n**Common steps required to perform for each infrastructure deployment.**\n\nUpon executing command to spawn infra, you need to authenticate yourself and provide the following details:\n\n- **var.access_key: AWS Access Key ID**\n  \n  You need to enter your AWS Management console Access Key ID here.\n  \n- **var.key_name**\n  \n  RedInfraCraft automates the retrieval of the secret PEM key file for your EC2 instances, ensuring a hassle-free experience. *To ensure uniqueness, you need to \n  provide different name each time*. Remembering the PEM file name is essential as you'll need it frequently throughout your operations.\n  \n- **var.secret_key: AWS Secret Access Key**\n  \n  You need to enter your AWS Management console Secret Access Key here.\n\nYou will see that your infra is deployed successfully. \n\n> [!NOTE]\n> Once the command is successfuly executed, you'll find the secret file (with the given name) in the same folder were you have deployed the tool inside the \n  respective infra's directory. Now, you need to connect the EC2 instance.\n\n1. **First limit the permissions of the secret file:**\n\n```bash\nchmod 400 YourSecretFileName\n```\n\nYou can also do it manually as well by visiting properties of the secret file.\n\n2. **Make an SSH connection with the machine:**\n\n```bash\nssh -i \"YourSecretFileName\" machine_name\n```\n\nYou can get this command from your AWS Management Console as well, remember you dont need to add `.pem` while entering *YourSecretFileName*\n\n<br>\n\n## 1 Mythic C2\n\n<br>\n\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Mythic1.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Mythic.png\">\n  <img align=\"center\" alt=\"Mythic_C2\" src=\"assets/Mythic.png\">\n</picture>\n</div>\n<br>\n<br>\n\n### Demo: Infra Deployment 🎬\n\nCheck out the demo for Infra deployment (plays directly in browser):\n\n[![asciicast](https://asciinema.org/a/688653.png)](https://RedTeamOperations.github.io/Red-Infra-Craft/html/Mythic_C2.html)\n\n\n\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create c2 mythic\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with EC2 instance, Check for the “access” directory inside it, you will find Mythic, navigate into it:\n\n  ```bash\n  cd access/Mythic\n  ```\n\n- To get the credentials of Mythic, run the following command:\n\n  ```bash\n  cat .env\n  ```\n\n- If you encounter a *directory not found* error, you need to restart Mythic by running the following command:\n\n  ```bash\n  sudo ./mythic-cli start\n  ```\n\n- Open a different PowerShell window to make a localhost connection for Mythic:\n\n  ```bash\n  ssh -L 7443:127.0.0.1:7443 -i \"YourSecretFileName\" machine_name\n  ```\n\n- Now, you can open the .env file in the first powershell window to retrieve the credentials:\n\n  ```bash\n  cat .env\n  ```\n\nThese steps will help you properly set up and connect to Mythic after provisioning the infrastructure.\n\nVisit https://localhost:7443/new/login to access Mythic.\n\n<br>\n\n## 2 Mythic C2 with ELB & CloudFront\n\n<br>\n<br>\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Mythic_ELB1.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Mythic_ELB.png\">\n  <img align=\"center\" alt=\"Mythic_c2_elb\" src=\"assets/Mythic_ELB.png\">\n</picture>\n</div>\n\n<br>\n\n### Demo: Infra Deployment 🎬\n\nCheck out the demo for Infra deployment (plays directly in browser):\n\n[![asciicast](https://asciinema.org/a/688653.png)](https://RedTeamOperations.github.io/Red-Infra-Craft/html/Mythic_C2_with_ELB.html)\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create c2 elb_c2\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with EC2 instance, Check for the “access” directory inside it, You will find Mythic, navigate into it:\n\n  ```bash\n  cd access/Mythic\n  ```\n\n- To get the credentials of Mythic, run the following command:\n\n  ```bash\n  cat .env\n  ```\n\n- If you encounter a \"directory not found\" error, you need to restart Mythic by running the following command:\n\n  ```bash\n  sudo ./mythic-cli start\n  ```\n\n- Open a different PowerShell window to make a localhost connection for Mythic:\n\n  ```bash\n  ssh -L 7443:127.0.0.1:7443 -i \"YourSecretFileName\" machine_name\n  ```\n\n- Now, you can open the .env file to retrieve the credentials:\n\n  ```bash\n  cat .env\n  ```\n\nThese steps will help you properly set up and connect to Mythic after provisioning the infrastructure.\n\n\n**To Create Payload:**\n\nAfter accessing Mythic, follow these steps to create a payload:\n\n1. Visit \"https://localhost:7443/new/login\" to access Mythic.\n2. Once logged in, navigate to the payload creation section.\n3. In the \"Domain\" field, add the domain of the CloudFront distribution. You can obtain this domain from the management console of AWS.\n4. Set the \"Callback port\" to 443.\n5. Review your payload configuration.\n6. You can view your payload details and download it for use. \n\nThese steps will help you create a payload in Mythic with the appropriate domain and callback port settings for your CloudFront distribution.\n\n<br>\n\n## 3 Payload - Pwndrop\n\n<br>\n\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/pwndrop1.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/pwndrop.png\">\n  <img align=\"center\" alt=\"pwndrop\" src=\"assets/pwndrop.png\">\n</picture>\n</div>\n\n<br>\n<br>\n\n### Demo: Infra Deployment 🎬\n\nCheck out the demo for Infra deployment (plays directly in browser):\n\n[![asciicast](https://asciinema.org/a/688653.png)](https://RedTeamOperations.github.io/Red-Infra-Craft/html/pwndrop.html)\n\n- To Deploy this infra you need to execute following command:\n\n- ```bash\n  redinfracraft.py create payload pwndrop\n  ```\n> [!NOTE] \n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with EC2 instance, Check for the “pwndrop” directory, navigate into it:\n\n  ```bash\n  cd pwndrop\n  ```\n\n- To start the Pwndrop on your machine:\n\n  ```bash\n  sudo ./pwndrop\n  ```\n\nVisit https://<your_machine_ip>/pwndrop to access Pwndrop dashboard\n\nThese steps will help you properly set up and connect to pwndrop after provisioning the infrastructure.\n\n<br>\n\n## 4 Phishing - GoPhish\n\n<br>\n\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/gophish1.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/gophish.png\">\n  <img align=\"center\" alt=\"gophish\" src=\"assets/gophish.png\">\n</picture>\n</div>\n\n<br>\n<br>\n\n### Demo: Infra Deployment 🎬\n\nCheck out the demo for Infra deployment (plays directly in browser):\n\n[![asciicast](https://asciinema.org/a/688653.png)](https://RedTeamOperations.github.io/Red-Infra-Craft/html/GoPhish.html)\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create phishing gophish\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with EC2 instance, to start the GoPhish on your machine, you need to execute following command:\n\n  ```bash\n  sudo ./gophish\n  ```\nVisit https://<your_machine_ip>:3333 to access Gophish dashboard\n\n  - Username (default): admin\n  - Password (default): gophish\n\nNow you can access all options of GoPhish.\n\nThese steps will help you properly set up and connect to GoPhish after provisioning the infrastructure.\n\n<br>\n\n## 5 Phishing - EvilGinx\n\n<br>\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/evilginx1.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/evilginx.png\">\n  <img align=\"center\" alt=\"evilginx\" src=\"assets/evilginx.png\">\n</picture>\n</div>\n\n<br>\n<br>\n\n### Demo: Infra Deployment 🎬\n\nCheck out the demo for Infra deployment (plays directly in browser):\n\n[![asciicast](https://asciinema.org/a/688653.png)](https://RedTeamOperations.github.io/Red-Infra-Craft/html/EvilGinx.html)\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create phishing evilginx\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with EC2 instance, Check for the “evilginx2” directory, navigate into it:\n\n  ```bash\n  cd evilginx2\n  ```\n\n- To start the EvilGinx on your machine :\n\n  ```bash\n  sudo ~/evilginx2/evilginx2 -p ./phishlets/\n  ```\n\nThese steps should help you properly set up and connect to EvilGinx after provisioning the infrastructure\n\n<br>\n\n## 6 All-in-one\n\n<br>\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Aws_Full_infra_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/AWS_Full_infra_Black.png\">\n  <img align=\"center\" alt=\"overall\" src=\"assets/Aws_Full_infra_White.png\">\n</picture>\n</div>\n\n\n### Demo: Infra Deployment 🎬\n\nCheck out the demo for Infra deployment (plays directly in browser):\n\n[![asciicast](https://asciinema.org/a/688653.png)](https://RedTeamOperations.github.io/Red-Infra-Craft/html/Full_Infra.html)\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create full_infra\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above**\n\nThis infrastructure offers you the flexibility to utilize every component. You must adhere to the specified steps for each respective component.\n<br>\n"
  },
  {
    "path": "infra_deployment_guide/Azure/readme.md",
    "content": "#  Infrastructure Walkthroughs:\n\n**Common steps required to perform for each infrastructure deployment.**\n\nBefore spinning any of the infra make sure you modify **terraform.auto.tfvars** and provide the following required details:\n\nLocation of **terraform.auto.tfvars** file: RedInfraCraft (V2) << Terraform << terraform.auto.tfvars\n\n- **subscription_id = <YOUR_SUBSCRIPTIO_ID>**\n  \n  You need to enter your Azure Subscription ID here.\n\n- **tenant_id = <YOUR_TENANT_ID>**\n  \n  You need to enter your Aure Tenant ID here.\n  \n- **client_id = <YOUR_CLIENT_ID>**\n  \n  You need to enter Service Account's Client ID here.\n  \n- **client_secret = <YOUR_CLIENT_SECRET>**\n  \n  You need to enter Service Account's Client ID here.\n\n- **vm_key_name = <VM_Secret_File_Name>**\n  \n  RedInfraCraft automates the retrieval of the secret PEM key file for your VM instances, ensuring a hassle-free experience. *To ensure uniqueness, you need to \n  provide different name each time*. Remembering the PEM file name is essential as you'll need it frequently throughout your operations.\n\n**Once you make the required changes, you can spawn your infra, every architectures command you will find further in this document!! **\n\nAfter that you will see that your infra is deployed successfully. \n\n> [!NOTE]\n> Once the command is successfuly executed, you'll find the secret file (with the given name) in the same folder were you have deployed the tool inside the \n  respective infra's directory. Now, you need to connect the VM instance.\n\n1. **First limit the permissions of the secret file:**\n\n```bash\nchmod 400 YourSecretFileName\n```\n\nYou can also do it manually as well by visiting properties of the secret file.\n\n2. **Make an SSH connection with the machine:**\n\n```bash\nssh -i \"YourSecretFileName\" username@ip_address\n```\n\n\n<br>\n\n## 1 Mythic C2\n\n<br>\n\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Mythic_C2_Azure_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Mythic_C2_Azure_Black.png\">\n  <img align=\"center\" alt=\"Mythic_C2\" src=\"assets/Mythic_C2_Azure_White.png\">\n</picture>\n</div>\n<br>\n<br>\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create azure c2 mythic\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with VM instance, Check for the “access” directory inside it, you will find Mythic, navigate into it:\n\n  ```bash\n  cd access/Mythic\n  ```\n\n- To get the credentials of Mythic, run the following command:\n\n  ```bash\n  cat .env\n  ```\n\n- If you encounter a *directory not found* error, you need to restart Mythic by running the following command:\n\n  ```bash\n  sudo ./mythic-cli start\n  ```\n\n- Open a different PowerShell window to make a localhost connection for Mythic:\n\n  ```bash\n  ssh -L 7443:127.0.0.1:7443 -i \"YourSecretFileName\" machine_name\n  ```\n\n- Now, you can open the .env file in the first powershell window to retrieve the credentials:\n\n  ```bash\n  cat .env\n  ```\n\nThese steps will help you properly set up and connect to Mythic after provisioning the infrastructure.\n\nVisit https://localhost:7443/new/login to access Mythic.\n\n<br>\n\n## 2 Mythic C2 with Frontdoor\n\n<br>\n<br>\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Mythic_C2with_ELB_Azure_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Mythic_C2with_ELB_Azure_Black.png\">\n  <img align=\"center\" alt=\"Mythic_c2_elb\" src=\"assets/Mythic_C2with_ELB_Azure_White.png\">\n</picture>\n</div>\n\n<br>\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create aure c2 elb_c2\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with VM instance, Check for the “access” directory inside it, You will find Mythic, navigate into it:\n\n  ```bash\n  cd access/Mythic\n  ```\n\n- To get the credentials of Mythic, run the following command:\n\n  ```bash\n  cat .env\n  ```\n\n- If you encounter a \"directory not found\" error, you need to restart Mythic by running the following command:\n\n  ```bash\n  sudo ./mythic-cli start\n  ```\n\n- Open a different PowerShell window to make a localhost connection for Mythic:\n\n  ```bash\n  ssh -L 7443:127.0.0.1:7443 -i \"YourSecretFileName\" machine_name\n  ```\n\n- Now, you can open the .env file to retrieve the credentials:\n\n  ```bash\n  cat .env\n  ```\n\nThese steps will help you properly set up and connect to Mythic after provisioning the infrastructure.\n\n\n**To Create Payload:**\n\nAfter accessing Mythic, follow these steps to create a payload:\n\n1. Visit \"https://localhost:7443/new/login\" to access Mythic.\n2. Once logged in, navigate to the payload creation section.\n3. In the \"Domain\" field, add the domain of the CloudFront distribution. You can obtain this domain from the management console of AWS.\n4. Set the \"Callback port\" to 443.\n5. Review your payload configuration.\n6. You can view your payload details and download it for use. \n\nThese steps will help you create a payload in Mythic with the appropriate domain and callback port settings for your CloudFront distribution.\n\n<br>\n\n## 3 Payload - Pwndrop\n\n<br>\n\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/pwndrop_Azure_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/pwndrop_Azure_Black.png\">\n  <img align=\"center\" alt=\"pwndrop\" src=\"assets/pwndrop_Azure_White.png\">\n</picture>\n</div>\n\n<br>\n<br>\n\n- To Deploy this infra you need to execute following command:\n\n- ```bash\n  redinfracraft.py create azure payload pwndrop\n  ```\n> [!NOTE] \n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with VM instance, Check for the “pwndrop” directory, navigate into it:\n\n  ```bash\n  cd pwndrop\n  ```\n\n- To start the Pwndrop on your machine:\n\n  ```bash\n  sudo ./pwndrop\n  ```\n\nVisit https://<your_machine_ip>/pwndrop to access Pwndrop dashboard\n\nThese steps will help you properly set up and connect to pwndrop after provisioning the infrastructure.\n\n<br>\n\n## 4 Phishing - GoPhish\n\n<br>\n\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/GoPhish_Azure_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/GoPhish_Azure_Black.png\">\n  <img align=\"center\" alt=\"gophish\" src=\"assets/GoPhish_Azure_White.png\">\n</picture>\n</div>\n\n<br>\n<br>\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create azure phishing gophish\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with VM instance, to start the GoPhish on your machine, you need to execute following command:\n\n  ```bash\n  sudo ./gophish\n  ```\nVisit https://<your_machine_ip>:3333 to access Gophish dashboard\n\n  - Username (default): admin\n  - Password (default): gophish\n\nNow you can access all options of GoPhish.\n\nThese steps will help you properly set up and connect to GoPhish after provisioning the infrastructure.\n\n<br>\n\n## 5 Phishing - EvilGinx\n\n<br>\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Evilginx_Azure_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Evilginx_Azure_Black.png\">\n  <img align=\"center\" alt=\"evilginx\" src=\"assets/Evilginx_Azure_White.png\">\n</picture>\n</div>\n\n<br>\n<br>\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create azure phishing evilginx\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with VM instance, Check for the “evilginx2” directory, navigate into it:\n\n  ```bash\n  cd evilginx2\n  ```\n\n- To start the EvilGinx on your machine :\n\n  ```bash\n  sudo ~/evilginx2/evilginx2 -p ./phishlets/\n  ```\n\nThese steps should help you properly set up and connect to EvilGinx after provisioning the infrastructure\n\n<br>\n\n## 6 All-in-one\n\n<br>\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/azure_Full_infra_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Azure_Full_infra_Black.png\">\n  <img align=\"center\" alt=\"overall\" src=\"assets/azure_Full_infra_White.png\">\n</picture>\n</div>\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create azure full_infra\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above**\n\nThis infrastructure offers you the flexibility to utilize every component. You must adhere to the specified steps for each respective component.\n<br>\n\n"
  },
  {
    "path": "infra_deployment_guide/GCP/readme.md",
    "content": "#  Infrastructure Walkthroughs:\n\n**Common steps required to perform for each infrastructure deployment.**\n\nStep-1: Before spinning any of the infra make sure you modify **terraform.auto.tfvars** and provide the following required details:\n\nLocation of **terraform.auto.tfvars** file: RedInfraCraft (V2) << Terraform << terraform.auto.tfvars\n\n- **project_id = \"<YOUR_PROJECT_ID>\"** \n  \n  You need to enter your Azure Project ID here.\n\n- **location = \"<YOUR_GCP_LOCATION>\"**\n\n  You need to enter your GCP Location here.\n\nStep-2: You need to authenticate to your Google Cloud Platform\n```bash\ngcloud auth activate-service-account --key-file <Path_of_Service_account_key_file>\n```\n\n**Once you make the required changes and authenticate to Google Cloud Platform, you can spawn your infra, every architectures command you will find further in this document!! **\n\nAfter that you will see that your infra is deployed successfully. \n\n> [!NOTE]\n> Once the command is successfuly executed, you'll find the secret file (with the given name) in the same folder were you have deployed the tool inside the \n  respective infra's directory. Now, you need to connect the VM instance.\n\n1. **First limit the permissions of the secret file:**\n\n```bash\nchmod 400 YourSecretFileName\n```\n\nYou can also do it manually as well by visiting properties of the secret file.\n\n2. **Make an SSH connection with the machine:**\n\n```bash\nssh -i \"YourSecretFileName\" username@ip_address\n```\n<br>\n\n## 2 Mythic C2 with ALB\n\n<br>\n<br>\n\n<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/Mythic_C2_ALB_GCP_White.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/Mythic_C2_ALB_GCP_Black.png\">\n  <img align=\"center\" alt=\"Mythic_c2_elb\" src=\"assets/Mythic_C2with_ELB_Azure_White.png\">\n</picture>\n</div>\n\n<br>\n\n- To Deploy this infra you need to execute following command:\n\n  ```bash\n  redinfracraft.py create aure c2 elb_c2\n  ```\n\n> [!NOTE]\n> Perform Common necessary steps mentioned above\n\n- After making the ssh connection with instance, Check for the “access” directory inside it, You will find Mythic, navigate into it:\n\n  ```bash\n  cd access/Mythic\n  ```\n\n- To get the credentials of Mythic, run the following command:\n\n  ```bash\n  cat .env\n  ```\n\n- If you encounter a \"directory not found\" error, you need to restart Mythic by running the following command:\n\n  ```bash\n  sudo ./mythic-cli start\n  ```\n\n- Open a different PowerShell window to make a localhost connection for Mythic:\n\n  ```bash\n  ssh -L 7443:127.0.0.1:7443 -i \"YourSecretFileName\" machine_name\n  ```\n\n- Now, you can open the .env file to retrieve the credentials:\n\n  ```bash\n  cat .env\n  ```\n\nThese steps will help you properly set up and connect to Mythic after provisioning the infrastructure.\n\n\n**To Create Payload:**\n\nAfter accessing Mythic, follow these steps to create a payload:\n\n1. Visit \"https://localhost:7443/new/login\" to access Mythic.\n2. Once logged in, navigate to the payload creation section.\n3. In the \"Domain\" field, add the domain of the CloudFront distribution. You can obtain this domain from the management console of AWS.\n4. Set the \"Callback port\" to 443.\n5. Review your payload configuration.\n6. You can view your payload details and download it for use. \n\nThese steps will help you create a payload in Mythic with the appropriate domain and callback port settings for your CloudFront distribution.\n\n<br>\n"
  },
  {
    "path": "redinfracraft/Terraform/AWS/AWS_Evilginx_Phishing_Server/main.tf",
    "content": "terraform {\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"5.46.0\"\n    }\n  }\n}\n\n\n# AWS Provider\nprovider \"aws\" {\n  region     = var.region\n  access_key = var.access_key\n  secret_key = var.secret_key\n}\n\nvariable \"access_key\" {\n  description = \"AWS Access Key ID\"\n}\n\nvariable \"secret_key\" {\n  description = \"AWS Secret Access Key\"\n}\n\nvariable \"region\" {\n  description = \"AWS Region\"\n}\n\nvariable \"key_name\" {\n  description = \"EC2 secret file name\"\n}\n\nvariable \"security_group\" {\n  description = \"Security group for EC2 Instance creatted through Terraform.\"\n  default = \"Terra_Phish_Ec2_sg\"\n}\ndata \"http\" \"my_ip\" {\n  url = \"https://api.ipify.org?format=text\"\n}\n\nlocals {\n  my_ip = \"${chomp(data.http.my_ip.response_body)}/32\"\n}\n\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"aws_key_pair\" \"key_pair\" {\n  key_name   = var.key_name\n  public_key = tls_private_key.rsa-4096.public_key_openssh\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.key_name\n}\n\n\n# EC2 Instance\nresource \"aws_instance\" \"Terra_Phish_Ec2\" {\n  ami           = \"ami-080e1f13689e07408\"\n  instance_type = \"t2.micro\"\n  key_name      = aws_key_pair.key_pair.key_name\n  security_groups = [var.security_group]\n  availability_zone = \"us-east-1a\"\n\n  root_block_device {\n    volume_size = 16  \n    delete_on_termination = true\n  }\n\n    \n  user_data = <<EOF\n#!/bin/bash\n\nsudo apt update\n\ncd /home/ubuntu\n\nsudo apt install -y wget\nwget https://golang.org/dl/go1.19.5.linux-amd64.tar.gz\nsudo tar -C /usr/local -xvf go1.19.5.linux-amd64.tar.gz\n\necho -e \"export GOROOT=/usr/local/go\" | sudo tee -a .profile\necho -e 'export GOPATH=$HOME/go' | sudo tee -a /home/ubuntu/.profile\necho -e 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' | sudo tee -a /home/ubuntu/.profile\nsource .profile\n\nsudo apt-get -y install git make\nsudo git clone https://github.com/kgretzky/evilginx2.git\n\n\ncd /home/ubuntu/evilginx2/\nsudo /usr/local/go/bin/go build -o /home/ubuntu/evilginx2/evilginx2 -ldflags=\"-s -w -buildid=\" -buildvcs=false\n\nsudo hostnamectl set-hostname cwltraining.live\n\nsudo reboot\n\nEOF\n# sudo ~/evilginx2/evilginx2 -p ./phishlets/\n\n\n  tags = {\n    Name = \"Terra_Phish_Ec2\"\n  }\n}\n\n\n# Security Group for EC2 Instance\nresource \"aws_security_group\" \"Terra_Phish_Ec2_sg\" {\n  name = var.security_group\n\n  ingress {\n    from_port   = 22\n    to_port     = 22\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  ingress {\n    from_port   = 443\n    to_port     = 443\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  ingress {\n    from_port   = 80\n    to_port     = 80\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  egress {\n    from_port   = 0\n    to_port     = 0\n    protocol    = \"-1\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n}\n\n\n# VPC\ndata \"aws_vpc\" \"default\" {\n  default = true\n}\n\n\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n************************************************************\n| 🖥️ Machine Ip: ${aws_instance.Terra_Phish_Ec2.public_ip} |\n************************************************************\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n********************************** \n| 👤 Username of Machine: ubuntu |\n**********************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n***************************************************************\n| 🗑️\tCommand: redinfracraft.py destroy aws phishing evilginx |\n***************************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/AWS/AWS_GoPhish_Phishing_Server/main.tf",
    "content": "terraform {\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"5.46.0\"\n    }\n  }\n}\n\n\n# AWS Provider\nprovider \"aws\" {\n  region     = var.region\n  access_key = var.access_key\n  secret_key = var.secret_key\n}\n\nvariable \"access_key\" {\n  description = \"AWS Access Key ID\"\n}\n\nvariable \"secret_key\" {\n  description = \"AWS Secret Access Key\"\n}\n\nvariable \"region\" {\n  description = \"AWS Region\"\n}\n\nvariable \"key_name\" {\n  description = \"EC2 secret file name\"\n}\n\n\nvariable \"security_group\" {\n  description = \"Security group for EC2 Instance creatted through Terraform.\"\n  default = \"Terra_GoPhish_Ec2_sg\"\n}\n\ndata \"http\" \"my_ip\" {\n  url = \"https://api.ipify.org?format=text\"\n}\n\nlocals {\n  my_ip = \"${chomp(data.http.my_ip.response_body)}/32\"\n}\n\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"aws_key_pair\" \"key_pair\" {\n  key_name   = var.key_name\n  public_key = tls_private_key.rsa-4096.public_key_openssh\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.key_name\n}\n\n\n# EC2 Instance\nresource \"aws_instance\" \"Terra_GoPhish_Ec2\" {\n  ami           = \"ami-080e1f13689e07408\"\n  instance_type = \"t2.micro\"\n  key_name      = aws_key_pair.key_pair.key_name\n  security_groups = [var.security_group]\n  availability_zone = \"us-east-1a\"\n\n  root_block_device {\n    volume_size = 16  \n    delete_on_termination = true\n  }\n    \n  user_data = <<EOF\n#!/bin/bash\n\nsudo apt update\n\ncd /home/ubuntu\n\nsudo apt install -y git \nsudo apt install -y wget\nsudo wget https://github.com/gophish/gophish/releases/download/0.7.1/gophish-v0.7.1-linux-64bit.zip\nsudo apt install -y unzip\nsudo unzip gophish-v0.7.1-linux-64bit.zip  \nchmod +x gophish\n\nsudo sh -c 'echo \"\" > config.json'\n\necho '{\n        \"admin_server\": {\n                \"listen_url\": \"0.0.0.0:3333\",\n                \"use_tls\": true,\n                \"cert_path\": \"gophish_admin.crt\",\n                \"key_path\": \"gophish_admin.key\"\n        },\n        \"phish_server\": {\n                \"listen_url\": \"0.0.0.0:80\",\n                \"use_tls\": false,\n                \"cert_path\": \"example.crt\",\n                \"key_path\": \"example.key\"\n        },\n        \"db_name\": \"sqlite3\",\n        \"db_path\": \"gophish.db\",\n        \"migrations_prefix\": \"db/db_\",\n        \"contact_address\": \"\"\n}' | sudo tee config.json > /dev/null\n\nsudo apt install -y sqlite3\nsudo sqlite3 gophish.db;\n\nEOF\n\n  tags = {\n    Name = \"Terra_GoPhish_Ec2\"\n  }\n}\n\n\n# Security Group for EC2 Instance\nresource \"aws_security_group\" \"Terra_GoPhish_Ec2_sg\" {\n  name = var.security_group\n\n  ingress {\n    from_port   = 22\n    to_port     = 22\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  ingress {\n    from_port   = 443\n    to_port     = 443\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  ingress {\n    from_port   = 80\n    to_port     = 80\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  ingress {\n    from_port   = 3333\n    to_port     = 3333\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  egress {\n    from_port   = 0\n    to_port     = 0\n    protocol    = \"-1\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n}\n\n\n# Default VPC\ndata \"aws_vpc\" \"default\" {\n  default = true\n}\n\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n**************************************************************\n| 🖥️ Machine Ip: ${aws_instance.Terra_GoPhish_Ec2.public_ip} |\n**************************************************************\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n********************************** \n| 👤 Username of Machine: ubuntu |\n**********************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n**************************************************************\n| 🗑️\tCommand: redinfracraft.py destroy aws phishing gophish |\n**************************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/AWS/AWS_Mythic_C2/main.tf",
    "content": "terraform {\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"5.46.0\"\n    }\n  }\n}\n\n\n# AWS Provider\nprovider \"aws\" {\n  region     = var.region\n  access_key = var.access_key\n  secret_key = var.secret_key\n}\n\nvariable \"access_key\" {\n  description = \"AWS Access Key ID\"\n}\n\nvariable \"secret_key\" {\n  description = \"AWS Secret Access Key\"\n}\n\nvariable \"region\" {\n  description = \"AWS Region\"\n}\n\nvariable \"key_name\" {\n  description = \"EC2 secret file name\"\n}\n\nvariable \"security_group\" {\n  description = \"Security group for EC2 Instance creatted through Terraform.\"\n  default = \"Mythic_EC2_sg\"\n}\n\n\ndata \"http\" \"my_ip\" {\n  url = \"https://api.ipify.org?format=text\"\n}\n\nlocals {\n  my_ip = \"${chomp(data.http.my_ip.response_body)}/32\"\n}\n\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"aws_key_pair\" \"key_pair\" {\n  key_name   = var.key_name\n  public_key = tls_private_key.rsa-4096.public_key_openssh\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.key_name\n}\n\n\n# EC2 Instance\nresource \"aws_instance\" \"Mythic_EC2\" {\n  ami           = \"ami-080e1f13689e07408\"\n  instance_type = \"t2.medium\"\n  key_name      = aws_key_pair.key_pair.key_name\n  security_groups = [var.security_group]\n  availability_zone = \"us-east-1e\"\n\n  root_block_device {\n    volume_size = 20  \n    delete_on_termination = true\n  }\n\n  user_data = <<EOF\n#!/bin/bash\n\nsudo mkdir -p /home/ubuntu/access\ncd /home/ubuntu/access\n\nsudo apt-get update -y\nsudo apt-get install -y git\n\nsudo git clone https://github.com/its-a-feature/Mythic\n\ncd /home/ubuntu/access/Mythic\n\nsudo apt install -y ca-certificates curl gnupg\n\n# Create the keyrings directory (if not already created)\nsudo mkdir -p /etc/apt/keyrings\n\n# Download and add the Docker GPG key\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n\nsudo apt update -y\nsudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\nsudo apt-get install -y make\nsudo make\n\nsudo /home/ubuntu/access/Mythic/mythic-cli install github https://github.com/MythicC2Profiles/http\nsudo -E /home/ubuntu/access/Mythic/mythic-cli install github https://github.com/MythicAgents/Apollo.git\n\nsudo /home/ubuntu/access/Mythic/mythic-cli start\n\nEOF\n\n  tags = {\n    Name = \"Mythic_EC2\"\n  }\n}\n\n\n# Security Group for EC2 Instance\nresource \"aws_security_group\" \"Mythic_EC2_sg\" {\n  name = var.security_group\n\n  ingress {\n    from_port   = 22\n    to_port     = 22\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n\n  egress {\n    from_port   = 0\n    to_port     = 0\n    protocol    = \"-1\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n}\n\n\n# VPC\ndata \"aws_vpc\" \"default\" {\n  default = true\n}\n\n\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n*******************************************************\n| 🖥️ Machine Ip: ${aws_instance.Mythic_EC2.public_ip} |\n*******************************************************\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n********************************** \n| 👤 Username of Machine: ubuntu |\n**********************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n*******************************************************\n| 🗑️\tCommand: redinfracraft.py destroy aws c2 mythic |\n*******************************************************\nEOF \n}\n"
  },
  {
    "path": "redinfracraft/Terraform/AWS/AWS_Mythic_C2_with_CloudFront/main.tf",
    "content": "terraform {\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"5.46.0\"\n    }\n  }\n}\n\n\n# AWS Provider\nprovider \"aws\" {\n  region     = var.region\n  access_key = var.access_key\n  secret_key = var.secret_key\n}\n\nvariable \"access_key\" {\n  description = \"AWS Access Key ID\"\n}\n\nvariable \"secret_key\" {\n  description = \"AWS Secret Access Key\"\n}\n\nvariable \"region\" {\n  description = \"AWS Region\"\n}\n\nvariable \"key_name\" {\n  description = \"EC2 secret file name\"\n}\n\n\nvariable \"security_group\" {\n  description = \"Security group for EC2 Instance creatted through Terraform.\"\n  default = \"terra_ec2_sg\"\n}\n\ndata \"http\" \"my_ip\" {\n  url = \"https://api.ipify.org?format=text\"\n}\n\nlocals {\n  my_ip = \"${chomp(data.http.my_ip.response_body)}/32\"\n}\n\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"aws_key_pair\" \"key_pair\" {\n  key_name   = var.key_name\n  public_key = tls_private_key.rsa-4096.public_key_openssh\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.key_name\n}\n\n\n# EC2 Instance\nresource \"aws_instance\" \"Terra_Ec2\" {\n  ami           = \"ami-080e1f13689e07408\"\n  instance_type = \"t2.medium\"\n  key_name      = aws_key_pair.key_pair.key_name\n  vpc_security_group_ids = [aws_security_group.Terra_Ec2_sg.id]\n  availability_zone = \"us-east-1e\"\n\n  root_block_device {\n    volume_size = 20  \n    delete_on_termination = true\n  }\n\n  user_data = <<EOF\n#!/bin/bash\n\nsudo mkdir -p /home/ubuntu/access\ncd /home/ubuntu/access\n\nsudo apt-get update -y\nsudo apt-get install -y git\n\nsudo git clone https://github.com/its-a-feature/Mythic\n\ncd /home/ubuntu/access/Mythic\n\nsudo apt install -y ca-certificates curl gnupg\n\n# Create the keyrings directory (if not already created)\nsudo mkdir -p /etc/apt/keyrings\n\n# Download and add the Docker GPG key\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n\nsudo apt update -y\nsudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\nsudo apt-get install -y make\nsudo make\n\nsudo /home/ubuntu/access/Mythic/mythic-cli install github https://github.com/MythicC2Profiles/http\nsudo -E /home/ubuntu/access/Mythic/mythic-cli install github https://github.com/MythicAgents/Apollo.git\n\nsudo /home/ubuntu/access/Mythic/mythic-cli start\n\nEOF\n\n  tags = {\n    Name = \"Terra_EC2\"\n  }\n}\n\n\n# Security Group for EC2 Instance\nresource \"aws_security_group\" \"Terra_Ec2_sg\" {\n  name = var.security_group\n\n  ingress {\n    from_port   = 22\n    to_port     = 22\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  ingress {\n    from_port   = 80\n    to_port     = 80\n    protocol    = \"tcp\"\n    security_groups = [aws_security_group.terraElbSg.id]\n  }\n\n  egress {\n    from_port   = 0\n    to_port     = 0\n    protocol    = \"-1\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n}\n\n\n# VPC\ndata \"aws_vpc\" \"default\" {\n  default = true\n}\n\n\n# Target Group\nresource \"aws_lb_target_group\" \"TerraEC2Tg\" {\n  name        = \"TerraEC2Tg\"\n  port        = 80\n  protocol    = \"HTTP\"\n  target_type = \"instance\"\n  vpc_id      = data.aws_vpc.default.id\n}\n\nresource \"aws_lb_target_group_attachment\" \"TerraEC2TgAttach\" {\n  target_group_arn = aws_lb_target_group.TerraEC2Tg.arn\n  target_id = aws_instance.Terra_Ec2.id\n  port = 80\n}\n\n\n# Subnet\ndata \"aws_subnets\" \"GetSubnet\" {\n  \n  filter {\n    name = \"vpc-id\"\n    values = [data.aws_vpc.default.id]\n  }\n  filter {\n    name   = \"availability-zone\"\n    values = [aws_instance.Terra_Ec2.availability_zone, \"us-east-1a\"] \n  }                                               \n}\n\n\n# Load Balancer\nresource \"aws_lb\" \"terraElb\" {\n  name               = \"terraElb\"\n  internal           = false\n  load_balancer_type = \"application\"\n  security_groups    = [aws_security_group.terraElbSg.id]\n  subnets            = data.aws_subnets.GetSubnet.ids\n  tags ={\n    Name = \"terraElb\"\n  }\n}\n\nresource \"aws_lb_listener\" \"http\" {\n  load_balancer_arn = aws_lb.terraElb.arn\n  port              = \"80\"\n  protocol          = \"HTTP\"\n  \n  default_action {\n    type             = \"forward\"\n    forward {\n      target_group{\n        arn = aws_lb_target_group.TerraEC2Tg.arn\n      }\n    }   \n  }\n}\n\n\n# Security Group for Load Balancer\nresource \"aws_security_group\" \"terraElbSg\" {\n  name = \"Allow http traffic\"\n  vpc_id      = data.aws_vpc.default.id\n\n  ingress {\n         from_port   = 80\n         to_port     = 80\n         protocol    = \"tcp\"\n         cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  egress {\n         from_port   = 0\n         to_port     = 0\n         protocol    = \"-1\"\n         cidr_blocks = [\"0.0.0.0/0\"]\n  }\n}\n\n\n# CloudFront\nresource \"aws_cloudfront_distribution\" \"my_cloudfront_distribution\" {\n  origin {\n    domain_name = aws_lb.terraElb.dns_name  # Use the DNS name of the Load Balancer as the origin\n    origin_id   = \"my-load-balancer-origin\"  # Set a unique ID for the origin\n    custom_origin_config {\n      http_port              = 80\n      https_port             = 443\n      origin_protocol_policy = \"http-only\"\n      origin_ssl_protocols   = [\"TLSv1.2\", \"TLSv1.1\"]\n    }\n  }\n\n  enabled             = true\n  is_ipv6_enabled     = true\n  comment             = \"My CloudFront Distribution\"\n  default_root_object = \"index.html\"\n\n  # Define default cache behavior\n  default_cache_behavior {\n    allowed_methods  = [\"GET\", \"HEAD\", \"OPTIONS\", \"PUT\", \"POST\", \"PATCH\", \"DELETE\"]\n    cached_methods   = [\"GET\", \"HEAD\"]\n    target_origin_id = \"my-load-balancer-origin\"  # Use the same origin ID as defined above\n    viewer_protocol_policy = \"allow-all\"\n    forwarded_values {\n      query_string = false\n      cookies {\n        forward = \"none\"\n      }\n    }\n    min_ttl = 0\n    default_ttl = 3600\n    max_ttl = 86400\n  }\n\n  # Define viewer certificate (if using HTTPS)\n  viewer_certificate {\n    cloudfront_default_certificate = true\n  }\n  \n  # Define restrictions, if needed (e.g., whitelist IP addresses)\n  restrictions {\n    geo_restriction {\n      restriction_type = \"none\"\n    }\n  }\n}\n\n\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n******************************************************\n| 🖥️ Machine Ip: ${aws_instance.Terra_Ec2.public_ip} |\n******************************************************\n\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n********************************** \n| 👤 Username of Machine: ubuntu |\n**********************************\nEOF\n}\n\n# Output the Domain of the CloudFront\noutput \"cloudfront_domain_name\" {\n  value = <<EOF\n***********************************************************************************************\n| 🌍 CloudFront Domain: ${aws_cloudfront_distribution.my_cloudfront_distribution.domain_name} |\n***********************************************************************************************\nEOF\n}\n\n\noutput \"destroy_infra\" {\n  value = <<EOF\n*********************************************************\n| 🗑️\tCommand: redinfracraft.py destroy aws c2 mythic_lb |\n*********************************************************\nEOF \n}\n"
  },
  {
    "path": "redinfracraft/Terraform/AWS/AWS_Pwndrop_Payload_Server/main.tf",
    "content": "terraform {\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"5.46.0\"\n    }\n  }\n}\n\n\n# AWS Provider\nprovider \"aws\" {\n  region     = var.region\n  access_key = var.access_key\n  secret_key = var.secret_key\n}\n\nvariable \"access_key\" {\n  description = \"AWS Access Key ID\"\n}\n\nvariable \"secret_key\" {\n  description = \"AWS Secret Access Key\"\n}\n\nvariable \"region\" {\n  description = \"AWS Region\"\n}\n\nvariable \"key_name\" {\n  description = \"EC2 secret file name\"\n}\n\n\nvariable \"security_group\" {\n  description = \"Security group for EC2 Instance creatted through Terraform.\"\n  default = \"Terra_Pwn_Ec2_sg\"\n}\n\n\ndata \"http\" \"my_ip\" {\n  url = \"https://api.ipify.org?format=text\"\n}\n\nlocals {\n  my_ip = \"${chomp(data.http.my_ip.response_body)}/32\"\n}\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"aws_key_pair\" \"key_pair\" {\n  key_name   = var.key_name\n  public_key = tls_private_key.rsa-4096.public_key_openssh\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.key_name\n}\n\n\n# EC2 Instance\nresource \"aws_instance\" \"Terra_Pwn_Ec2\" {\n  ami           = \"ami-080e1f13689e07408\"\n  instance_type = \"t2.micro\"\n  key_name      = aws_key_pair.key_pair.key_name\n  security_groups = [var.security_group]\n  availability_zone = \"us-east-1a\"\n\n  root_block_device {\n    volume_size = 16  \n    delete_on_termination = true\n  }\n\n    \n  user_data = <<EOF\n#!/bin/bash\n\nsudo apt update\n\ncd /home/ubuntu\n\nsudo apt install -y wget\nwget https://github.com/kgretzky/pwndrop/releases/download/1.0.1/pwndrop-linux-amd64.tar.gz\ntar zxvf pwndrop-linux-amd64.tar.gz \n\nEOF\n\n  tags = {\n    Name = \"Terra_Pwn_Ec2\"\n  }\n}\n\n\n# Security Group for EC2 Instance\nresource \"aws_security_group\" \"Terra_Pwn_Ec2_sg\" {\n  name = var.security_group\n\n  ingress {\n    from_port   = 22\n    to_port     = 22\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  ingress {\n    from_port   = 443\n    to_port     = 443\n    protocol    = \"tcp\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n\n  egress {\n    from_port   = 0\n    to_port     = 0\n    protocol    = \"-1\"\n    cidr_blocks = [\"0.0.0.0/0\"]\n  }\n}\n\n\n# VPC\ndata \"aws_vpc\" \"default\" {\n  default = true\n}\n\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n**********************************************************\n| 🖥️ Machine Ip: ${aws_instance.Terra_Pwn_Ec2.public_ip} |\n**********************************************************\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n********************************** \n| 👤 Username of Machine: ubuntu |\n**********************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n*************************************************************\n| 🗑️\tCommand: redinfracraft.py destroy aws payload pwndrop |\n*************************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Evilginx_Phishing_Server/main.tf",
    "content": "terraform {\n  required_providers {\n    azurerm = {\n      source  = \"hashicorp/azurerm\"\n      version = \"~> 3.0\"\n    }\n    azuread = {\n      source  = \"hashicorp/azuread\"\n      version = \"~> 2.0\"\n    }\n  }\n}\n\n/* \nBefore Executing this terraform script, you need to create one Service Principal with \nOwner, User Access Administrator, User Administrator, Global Administrator Permissions.\n*/\n\nprovider \"azurerm\" {\n  features {}\n  subscription_id = var.subscription_id\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  tenant_id       = var.tenant_id\n}\n\nvariable \"subscription_id\" {\n  description = \"Azure Subscription Id\"\n  type = string\n}\n\nvariable \"client_id\" {\n  description = \"Azure Client Id\"\n  type = string\n}\n\nvariable \"client_secret\" {\n  description = \"Azure Client Secret\"\n  type = string\n}\n\nvariable \"tenant_id\" {\n  description = \"Azure Tenant Id\"\n  type = string\n}\n\nvariable \"vm_key_name\" {\n  description = \"VM Secret File Name\"\n  type = string\n}\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.vm_key_name\n}\n\n# 1. Create Resource Group\nresource \"azurerm_resource_group\" \"rg\" {\n  name     = \"Mythic\"\n  location = \"East US\"\n}\n\n\n# 1. Create Virtual Network\nresource \"azurerm_virtual_network\" \"vnet\" {\n  name                = \"myVNet\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  address_space       = [\"10.0.0.0/16\"]\n}\n\n# 3. Create Subnet\nresource \"azurerm_subnet\" \"subnet\" {\n  name                 = \"mySubnet\"\n  resource_group_name  = azurerm_resource_group.rg.name\n  virtual_network_name = azurerm_virtual_network.vnet.name\n  address_prefixes     = [\"10.0.1.0/24\"]\n}\n\n# 4. Create Public IP\nresource \"azurerm_public_ip\" \"pip\" {\n  name                = \"myPublicIP\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  allocation_method   = \"Dynamic\"\n  domain_name_label   = \"mypublicipdns12343131245325675\" \n}\n\n# 5. Create Network Interface\nresource \"azurerm_network_interface\" \"nic\" {\n  name                = \"myNIC\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  ip_configuration {\n    name                          = \"myNicConfiguration\"\n    subnet_id                     = azurerm_subnet.subnet.id\n    private_ip_address_allocation = \"Dynamic\"\n    public_ip_address_id          = azurerm_public_ip.pip.id\n  }\n\n}\n\n# 6. Create Virtual Machine with User Data\nresource \"azurerm_linux_virtual_machine\" \"vm\" {\n  name                = \"myVM\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  network_interface_ids = [azurerm_network_interface.nic.id]\n  size                = \"Standard_B1ms\"\n\n  admin_username = \"azureuser\"\n\n  os_disk {\n    caching              = \"ReadWrite\"\n    storage_account_type = \"Standard_LRS\"\n  }\n\n  source_image_reference {\n    publisher = \"Canonical\"\n    offer     = \"UbuntuServer\"\n    sku       = \"18.04-LTS\"\n    version   = \"latest\"\n  }\n\n  admin_ssh_key {\n    username   = \"azureuser\"\n    public_key = tls_private_key.rsa-4096.public_key_openssh\n  }\n\n  disable_password_authentication = true\n\n  custom_data = base64encode(file(\"script.sh\"))\n}\n\nresource \"azurerm_network_interface_security_group_association\" \"example\" {\n  network_interface_id      = azurerm_network_interface.nic.id\n  network_security_group_id = azurerm_network_security_group.nsg.id\n}\n\nresource \"azurerm_network_security_group\" \"nsg\" {\n  name                = \"myNSG\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  security_rule {\n    name                       = \"Allow-HTTP-Inbound\"\n    priority                   = 100\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"80\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTP traffic using the Http tag\"\n   \n  }\n\n  security_rule {\n    name                       = \"Allow-HTTPS-Inbound\"\n    priority                   = 110\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"443\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTPS traffic using the Https tag\"\n  \n  }\n\n  security_rule {\n    name                       = \"Allow-SSH\"\n    priority                   = 120\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"22\"\n    source_address_prefix     = \"*\"\n    destination_address_prefix = \"*\"\n  }\n}\n\n\n\ndata \"azurerm_client_config\" \"current\" {}\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n************************************************************************\n| 🖥️ Machine Ip: ${azurerm_linux_virtual_machine.vm.public_ip_address} |\n************************************************************************\n\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n*************************************\n| 👤 Username of Machine: azureuser |\n*************************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n****************************************************************\n| 🗑️\tCommand: redinfracraft.py destroy azure phishing evilginx |\n****************************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Evilginx_Phishing_Server/script.sh",
    "content": "#!/bin/bash\n\nsudo apt update\n\ncd /home/azureuser\n\nsudo apt install -y wget\nwget https://golang.org/dl/go1.19.5.linux-amd64.tar.gz\nsudo tar -C /usr/local -xvf go1.19.5.linux-amd64.tar.gz\n\necho -e \"export GOROOT=/usr/local/go\" | sudo tee -a .profile\necho -e 'export GOPATH=$HOME/go' | sudo tee -a /home/azureuser/.profile\necho -e 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' | sudo tee -a /home/azureuser/.profile\nsource .profile\n\nsudo apt-get -y install git make\nsudo git clone https://github.com/kgretzky/evilginx2.git\n\n\ncd /home/azureuser/evilginx2/\nsudo /usr/local/go/bin/go build -o /home/azureuser/evilginx2/evilginx2 -ldflags=\"-s -w -buildid=\" -buildvcs=false\n\nsudo hostnamectl set-hostname cwltraining.live\n\nsudo reboot"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_GoPhish_Phishing_Server/main.tf",
    "content": "terraform {\n  required_providers {\n    azurerm = {\n      source  = \"hashicorp/azurerm\"\n      version = \"~> 3.0\"\n    }\n    azuread = {\n      source  = \"hashicorp/azuread\"\n      version = \"~> 2.0\"\n    }\n  }\n}\n\n/* \nBefore Executing this terraform script, you need to create one Service Principal with \nOwner, User Access Administrator, User Administrator, Global Administrator Permissions.\n*/\n\nprovider \"azurerm\" {\n  features {}\n  subscription_id = var.subscription_id\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  tenant_id       = var.tenant_id\n}\n\nvariable \"subscription_id\" {\n  description = \"Azure Subscription Id\"\n  type = string\n}\n\nvariable \"client_id\" {\n  description = \"Azure Client Id\"\n  type = string\n}\n\nvariable \"client_secret\" {\n  description = \"Azure Client Secret\"\n  type = string\n}\n\nvariable \"tenant_id\" {\n  description = \"Azure Tenant Id\"\n  type = string\n}\n\nvariable \"vm_key_name\" {\n  description = \"VM Secret File Name\"\n  type = string\n}\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.vm_key_name\n}\n\n# 1. Create Resource Group\nresource \"azurerm_resource_group\" \"rg\" {\n  name     = \"Mythic\"\n  location = \"East US\"\n}\n\n\n# 1. Create Virtual Network\nresource \"azurerm_virtual_network\" \"vnet\" {\n  name                = \"myVNet\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  address_space       = [\"10.0.0.0/16\"]\n}\n\n# 3. Create Subnet\nresource \"azurerm_subnet\" \"subnet\" {\n  name                 = \"mySubnet\"\n  resource_group_name  = azurerm_resource_group.rg.name\n  virtual_network_name = azurerm_virtual_network.vnet.name\n  address_prefixes     = [\"10.0.1.0/24\"]\n}\n\n# 4. Create Public IP\nresource \"azurerm_public_ip\" \"pip\" {\n  name                = \"myPublicIP\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  allocation_method   = \"Dynamic\"\n  domain_name_label   = \"mypublicipdns12343131245325675\" \n}\n\n# 5. Create Network Interface\nresource \"azurerm_network_interface\" \"nic\" {\n  name                = \"myNIC\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  ip_configuration {\n    name                          = \"myNicConfiguration\"\n    subnet_id                     = azurerm_subnet.subnet.id\n    private_ip_address_allocation = \"Dynamic\"\n    public_ip_address_id          = azurerm_public_ip.pip.id\n  }\n\n}\n\n# 6. Create Virtual Machine with User Data\nresource \"azurerm_linux_virtual_machine\" \"vm\" {\n  name                = \"myVM\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  network_interface_ids = [azurerm_network_interface.nic.id]\n  size                = \"Standard_B1ms\"\n\n  admin_username = \"azureuser\"\n\n  os_disk {\n    caching              = \"ReadWrite\"\n    storage_account_type = \"Standard_LRS\"\n  }\n\n  source_image_reference {\n    publisher = \"Canonical\"\n    offer     = \"UbuntuServer\"\n    sku       = \"18.04-LTS\"\n    version   = \"latest\"\n  }\n\n  admin_ssh_key {\n    username   = \"azureuser\"\n    public_key = tls_private_key.rsa-4096.public_key_openssh\n  }\n\n  disable_password_authentication = true\n\n  custom_data = base64encode(file(\"script.sh\"))\n}\n\nresource \"azurerm_network_interface_security_group_association\" \"example\" {\n  network_interface_id      = azurerm_network_interface.nic.id\n  network_security_group_id = azurerm_network_security_group.nsg.id\n}\n\nresource \"azurerm_network_security_group\" \"nsg\" {\n  name                = \"myNSG\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  security_rule {\n    name                       = \"Allow-HTTP-Inbound\"\n    priority                   = 100\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"80\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTP traffic using the Http tag\"\n   \n  }\n\n  security_rule {\n    name                       = \"Allow-HTTPS-Inbound\"\n    priority                   = 110\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"443\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTPS traffic using the Https tag\"\n  \n  }\n\n  security_rule {\n    name                       = \"Allow-SSH\"\n    priority                   = 120\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"22\"\n    source_address_prefix     = \"*\"\n    destination_address_prefix = \"*\"\n  }\n}\n\n\n\ndata \"azurerm_client_config\" \"current\" {}\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n************************************************************************\n| 🖥️ Machine Ip: ${azurerm_linux_virtual_machine.vm.public_ip_address} |\n************************************************************************\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n*************************************\n| 👤 Username of Machine: azureuser |\n*************************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n***************************************************************\n| 🗑️\tCommand: redinfracraft.py destroy azure phishing gophish |\n***************************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_GoPhish_Phishing_Server/script.sh",
    "content": "#!/bin/bash\n\nsudo apt update\n\ncd /home/azureuser\n\nsudo apt install -y git \nsudo apt install -y wget\nsudo wget https://github.com/gophish/gophish/releases/download/0.7.1/gophish-v0.7.1-linux-64bit.zip\nsudo apt install -y unzip\nsudo unzip gophish-v0.7.1-linux-64bit.zip  \nchmod +x gophish\n\nsudo sh -c 'echo \"\" > config.json'\n\necho '{\n        \"admin_server\": {\n                \"listen_url\": \"0.0.0.0:3333\",\n                \"use_tls\": true,\n                \"cert_path\": \"gophish_admin.crt\",\n                \"key_path\": \"gophish_admin.key\"\n        },\n        \"phish_server\": {\n                \"listen_url\": \"0.0.0.0:80\",\n                \"use_tls\": false,\n                \"cert_path\": \"example.crt\",\n                \"key_path\": \"example.key\"\n        },\n        \"db_name\": \"sqlite3\",\n        \"db_path\": \"gophish.db\",\n        \"migrations_prefix\": \"db/db_\",\n        \"contact_address\": \"\"\n}' | sudo tee config.json > /dev/null\n\nsudo apt install -y sqlite3\nsudo sqlite3 gophish.db;"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Mythic_C2/main.tf",
    "content": "terraform {\n  required_providers {\n    azurerm = {\n      source  = \"hashicorp/azurerm\"\n      version = \"~> 3.0\"\n    }\n    azuread = {\n      source  = \"hashicorp/azuread\"\n      version = \"~> 2.0\"\n    }\n  }\n}\n\n/* \nBefore Executing this terraform script, you need to create one Service Principal with \nOwner, User Access Administrator, User Administrator, Global Administrator Permissions.\n*/\n\nprovider \"azurerm\" {\n  features {}\n  subscription_id = var.subscription_id\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  tenant_id       = var.tenant_id\n}\n\nvariable \"subscription_id\" {\n  description = \"Azure Subscription Id\"\n  type = string\n}\n\nvariable \"client_id\" {\n  description = \"Azure Client Id\"\n  type = string\n}\n\nvariable \"client_secret\" {\n  description = \"Azure Client Secret\"\n  type = string\n}\n\nvariable \"tenant_id\" {\n  description = \"Azure Tenant Id\"\n  type = string\n}\n\nvariable \"vm_key_name\" {\n  description = \"VM Secret File Name\"\n  type = string\n}\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.vm_key_name\n}\n\n# 1. Create Resource Group\nresource \"azurerm_resource_group\" \"rg\" {\n  name     = \"Mythic\"\n  location = \"East US\"\n}\n\n\n# 1. Create Virtual Network\nresource \"azurerm_virtual_network\" \"vnet\" {\n  name                = \"myVNet\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  address_space       = [\"10.0.0.0/16\"]\n}\n\n# 3. Create Subnet\nresource \"azurerm_subnet\" \"subnet\" {\n  name                 = \"mySubnet\"\n  resource_group_name  = azurerm_resource_group.rg.name\n  virtual_network_name = azurerm_virtual_network.vnet.name\n  address_prefixes     = [\"10.0.1.0/24\"]\n}\n\n# 4. Create Public IP\nresource \"azurerm_public_ip\" \"pip\" {\n  name                = \"myPublicIP\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  allocation_method   = \"Dynamic\"\n  domain_name_label   = \"mypublicipdns12343131245325675\" \n}\n\n# 5. Create Network Interface\nresource \"azurerm_network_interface\" \"nic\" {\n  name                = \"myNIC\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  ip_configuration {\n    name                          = \"myNicConfiguration\"\n    subnet_id                     = azurerm_subnet.subnet.id\n    private_ip_address_allocation = \"Dynamic\"\n    public_ip_address_id          = azurerm_public_ip.pip.id\n  }\n\n}\n\n# 6. Create Virtual Machine with User Data\nresource \"azurerm_linux_virtual_machine\" \"vm\" {\n  name                = \"myVM\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  network_interface_ids = [azurerm_network_interface.nic.id]\n  size                = \"Standard_B1ms\"\n\n  admin_username = \"azureuser\"\n\n  os_disk {\n    caching              = \"ReadWrite\"\n    storage_account_type = \"Standard_LRS\"\n  }\n\n  source_image_reference {\n    publisher = \"Canonical\"\n    offer     = \"UbuntuServer\"\n    sku       = \"18.04-LTS\"\n    version   = \"latest\"\n  }\n\n  admin_ssh_key {\n    username   = \"azureuser\"\n    public_key = tls_private_key.rsa-4096.public_key_openssh\n  }\n\n  disable_password_authentication = true\n\n  custom_data = base64encode(file(\"script.sh\"))\n}\n\nresource \"azurerm_network_interface_security_group_association\" \"example\" {\n  network_interface_id      = azurerm_network_interface.nic.id\n  network_security_group_id = azurerm_network_security_group.nsg.id\n}\n\nresource \"azurerm_network_security_group\" \"nsg\" {\n  name                = \"myNSG\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  security_rule {\n    name                       = \"Allow-HTTP-Inbound\"\n    priority                   = 100\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"80\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTP traffic using the Http tag\"\n   \n  }\n\n  security_rule {\n    name                       = \"Allow-HTTPS-Inbound\"\n    priority                   = 110\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"443\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTPS traffic using the Https tag\"\n  \n  }\n\n  security_rule {\n    name                       = \"Allow-SSH\"\n    priority                   = 120\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"22\"\n    source_address_prefix     = \"*\"\n    destination_address_prefix = \"*\"\n  }\n}\n\ndata \"azurerm_client_config\" \"current\" {}\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n************************************************************************\n| 🖥️ Machine Ip: ${azurerm_linux_virtual_machine.vm.public_ip_address} |\n************************************************************************\n\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n*************************************\n| 👤 Username of Machine: azureuser |\n*************************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n********************************************************\n| 🗑️\tCommand: redinfracraft.py destroy azure c2 mythic |\n********************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Mythic_C2/script.sh",
    "content": "#!/bin/bash\n\nsudo mkdir -p /home/azureuser/access\ncd /home/azureuser/access\n\nsudo apt-get update -y\nsudo apt-get install -y git\n\nsudo git clone https://github.com/its-a-feature/Mythic\n\ncd /home/azureuser/access/Mythic\n\nsudo apt install -y ca-certificates curl gnupg\n\n# Create the keyrings directory (if not already created)\nsudo mkdir -p /etc/apt/keyrings\n\n# Download and add the Docker GPG key\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n\nsudo apt update -y\nsudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\nsudo apt-get install -y make\nsudo make\n\nsudo /home/azureuser/access/Mythic/mythic-cli install github https://github.com/MythicC2Profiles/http\nsudo -E /home/azureuser/access/Mythic/mythic-cli install github https://github.com/MythicAgents/Apollo.git\n\nsudo /home/azureuser/access/Mythic/mythic-cli start\n"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Mythic_C2_with_Frontdoor/main.tf",
    "content": "terraform {\n  required_providers {\n    azurerm = {\n      source  = \"hashicorp/azurerm\"\n      version = \"~> 3.0\"\n    }\n    azuread = {\n      source  = \"hashicorp/azuread\"\n      version = \"~> 2.0\"\n    }\n  }\n}\n\n/* \nBefore Executing this terraform script, you need to create one Service Principal with \nOwner, User Access Administrator, User Administrator, Global Administrator Permissions.\n*/\n\nprovider \"azurerm\" {\n  features {}\n  subscription_id = var.subscription_id\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  tenant_id       = var.tenant_id\n}\n\nvariable \"subscription_id\" {\n  description = \"Azure Subscription Id\"\n  type = string\n}\n\nvariable \"client_id\" {\n  description = \"Azure Client Id\"\n  type = string\n}\n\nvariable \"client_secret\" {\n  description = \"Azure Client Secret\"\n  type = string\n}\n\nvariable \"tenant_id\" {\n  description = \"Azure Tenant Id\"\n  type = string\n}\n\nvariable \"vm_key_name\" {\n  description = \"VM Secret File Name\"\n  type = string\n}\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.vm_key_name\n}\n\n# 1. Create Resource Group\nresource \"azurerm_resource_group\" \"rg\" {\n  name     = \"Mythic\"\n  location = \"East US\"\n}\n\n\n# 1. Create Virtual Network\nresource \"azurerm_virtual_network\" \"vnet\" {\n  name                = \"myVNet\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  address_space       = [\"10.0.0.0/16\"]\n}\n\n# 3. Create Subnet\nresource \"azurerm_subnet\" \"subnet\" {\n  name                 = \"mySubnet\"\n  resource_group_name  = azurerm_resource_group.rg.name\n  virtual_network_name = azurerm_virtual_network.vnet.name\n  address_prefixes     = [\"10.0.1.0/24\"]\n}\n\n# 4. Create Public IP\nresource \"azurerm_public_ip\" \"pip\" {\n  name                = \"myPublicIP\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  allocation_method   = \"Dynamic\"\n  domain_name_label   = \"mypublicipdns12343131245325675\" \n}\n\n# 5. Create Network Interface\nresource \"azurerm_network_interface\" \"nic\" {\n  name                = \"myNIC\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  ip_configuration {\n    name                          = \"myNicConfiguration\"\n    subnet_id                     = azurerm_subnet.subnet.id\n    private_ip_address_allocation = \"Dynamic\"\n    public_ip_address_id          = azurerm_public_ip.pip.id\n  }\n\n}\n\n# 6. Create Virtual Machine with User Data\nresource \"azurerm_linux_virtual_machine\" \"vm\" {\n  name                = \"myVM\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  network_interface_ids = [azurerm_network_interface.nic.id]\n  size                = \"Standard_B1ms\"\n\n  admin_username = \"azureuser\"\n\n  os_disk {\n    caching              = \"ReadWrite\"\n    storage_account_type = \"Standard_LRS\"\n  }\n\n  source_image_reference {\n    publisher = \"Canonical\"\n    offer     = \"UbuntuServer\"\n    sku       = \"18.04-LTS\"\n    version   = \"latest\"\n  }\n\n  admin_ssh_key {\n    username   = \"azureuser\"\n    public_key = tls_private_key.rsa-4096.public_key_openssh\n  }\n\n  disable_password_authentication = true\n\n  custom_data = base64encode(file(\"script.sh\"))\n}\n\nresource \"azurerm_network_interface_security_group_association\" \"example\" {\n  network_interface_id      = azurerm_network_interface.nic.id\n  network_security_group_id = azurerm_network_security_group.nsg.id\n}\n\nresource \"azurerm_network_security_group\" \"nsg\" {\n  name                = \"myNSG\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  security_rule {\n    name                       = \"Allow-HTTP-Inbound\"\n    priority                   = 100\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"80\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTP traffic using the Http tag\"\n   \n  }\n\n  security_rule {\n    name                       = \"Allow-HTTPS-Inbound\"\n    priority                   = 110\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"443\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTPS traffic using the Https tag\"\n  \n  }\n\n  security_rule {\n    name                       = \"Allow-SSH\"\n    priority                   = 120\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"22\"\n    source_address_prefix     = \"*\"\n    destination_address_prefix = \"*\"\n  }\n}\n\n\n\ndata \"azurerm_client_config\" \"current\" {}\n\nresource \"azurerm_cdn_frontdoor_profile\" \"example\" {\n  name                = \"example-profile\"\n  resource_group_name = azurerm_resource_group.rg.name\n  sku_name            = \"Premium_AzureFrontDoor\"\n}\n\nresource \"azurerm_cdn_frontdoor_origin_group\" \"example\" {\n  name                     = \"example-origingroup\"\n  cdn_frontdoor_profile_id = azurerm_cdn_frontdoor_profile.example.id\n\n  health_probe {\n    interval_in_seconds = 240\n    path                = \"/\"\n    protocol            = \"Http\"\n    request_type        = \"HEAD\"\n  }\n\n  load_balancing {}\n}\n\nresource \"azurerm_cdn_frontdoor_origin\" \"example\" {\n  name                          = \"example-origin\"\n  cdn_frontdoor_origin_group_id = azurerm_cdn_frontdoor_origin_group.example.id\n  enabled                       = true\n\n  certificate_name_check_enabled = true\n\n  host_name          = azurerm_linux_virtual_machine.vm.public_ip_address\n  http_port          = 80\n  https_port         = 443\n  origin_host_header = azurerm_linux_virtual_machine.vm.public_ip_address\n  priority           = 1\n  weight             = 1\n}\n\nresource \"azurerm_cdn_frontdoor_endpoint\" \"example\" {\n  name                     = \"example-xoxo-testing-endpoint\"\n  cdn_frontdoor_profile_id = azurerm_cdn_frontdoor_profile.example.id\n}\n\nresource \"azurerm_cdn_frontdoor_route\" \"example\" {\n  name                          = \"example-route\"\n  cdn_frontdoor_endpoint_id     = azurerm_cdn_frontdoor_endpoint.example.id\n  cdn_frontdoor_origin_group_id = azurerm_cdn_frontdoor_origin_group.example.id\n  cdn_frontdoor_origin_ids      = [azurerm_cdn_frontdoor_origin.example.id]\n  enabled                       = true\n\n  forwarding_protocol    = \"HttpOnly\"\n  https_redirect_enabled = true\n  patterns_to_match      = [\"/*\"]\n  supported_protocols    = [\"Http\", \"Https\"]\n}\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n************************************************************************\n| 🖥️ Machine Ip: ${azurerm_linux_virtual_machine.vm.public_ip_address} |\n************************************************************************\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n*************************************\n| 👤 Username of Machine: azureuser |\n*************************************\nEOF\n}\n\n# Output the Domain of the CloudFront\noutput \"cloudfront_domain_name\" {\n  value = <<EOF\n*****************************************************************************\n| 🌍 CloudFront Domain: ${azurerm_cdn_frontdoor_endpoint.example.host_name} |\n*****************************************************************************\nEOF\n}\n\n\noutput \"destroy_infra\" {\n  value = <<EOF\n***********************************************************\n| 🗑️\tCommand: redinfracraft.py destroy azure c2 mythic_lb |\n***********************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Mythic_C2_with_Frontdoor/script.sh",
    "content": "#!/bin/bash\n\nsudo mkdir -p /home/azureuser/access\ncd /home/azureuser/access\n\nsudo apt-get update -y\nsudo apt-get install -y git\n\nsudo git clone https://github.com/its-a-feature/Mythic\n\ncd /home/azureuser/access/Mythic\n\nsudo apt install -y ca-certificates curl gnupg\n\n# Create the keyrings directory (if not already created)\nsudo mkdir -p /etc/apt/keyrings\n\n# Download and add the Docker GPG key\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n\nsudo apt update -y\nsudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\nsudo apt-get install -y make\nsudo make\n\nsudo /home/azureuser/access/Mythic/mythic-cli install github https://github.com/MythicC2Profiles/http\nsudo -E /home/azureuser/access/Mythic/mythic-cli install github https://github.com/MythicAgents/Apollo.git\n\nsudo /home/azureuser/access/Mythic/mythic-cli start\n"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Pwndrop_Payload_Server/main.tf",
    "content": "terraform {\n  required_providers {\n    azurerm = {\n      source  = \"hashicorp/azurerm\"\n      version = \"~> 3.0\"\n    }\n    azuread = {\n      source  = \"hashicorp/azuread\"\n      version = \"~> 2.0\"\n    }\n  }\n}\n\n/* \nBefore Executing this terraform script, you need to create one Service Principal with \nOwner, User Access Administrator, User Administrator, Global Administrator Permissions.\n*/\n\nprovider \"azurerm\" {\n  features {}\n  subscription_id = var.subscription_id\n  client_id       = var.client_id\n  client_secret   = var.client_secret\n  tenant_id       = var.tenant_id\n}\n\nvariable \"subscription_id\" {\n  description = \"Azure Subscription Id\"\n  type = string\n}\n\nvariable \"client_id\" {\n  description = \"Azure Client Id\"\n  type = string\n}\n\nvariable \"client_secret\" {\n  description = \"Azure Client Secret\"\n  type = string\n}\n\nvariable \"tenant_id\" {\n  description = \"Azure Tenant Id\"\n  type = string\n}\n\nvariable \"vm_key_name\" {\n  description = \"VM Secret File Name\"\n  type = string\n}\n\n# Key Pair\nresource \"tls_private_key\" \"rsa-4096\" {\n  algorithm = \"RSA\"\n  rsa_bits  = 4096\n}\n\nresource \"local_file\" \"private_key\" {\n  content  = tls_private_key.rsa-4096.private_key_pem\n  filename = var.vm_key_name\n}\n\n# 1. Create Resource Group\nresource \"azurerm_resource_group\" \"rg\" {\n  name     = \"Mythic\"\n  location = \"East US\"\n}\n\n\n# 1. Create Virtual Network\nresource \"azurerm_virtual_network\" \"vnet\" {\n  name                = \"myVNet\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  address_space       = [\"10.0.0.0/16\"]\n}\n\n# 3. Create Subnet\nresource \"azurerm_subnet\" \"subnet\" {\n  name                 = \"mySubnet\"\n  resource_group_name  = azurerm_resource_group.rg.name\n  virtual_network_name = azurerm_virtual_network.vnet.name\n  address_prefixes     = [\"10.0.1.0/24\"]\n}\n\n# 4. Create Public IP\nresource \"azurerm_public_ip\" \"pip\" {\n  name                = \"myPublicIP\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  allocation_method   = \"Dynamic\"\n  domain_name_label   = \"mypublicipdns12343131245325675\" \n}\n\n# 5. Create Network Interface\nresource \"azurerm_network_interface\" \"nic\" {\n  name                = \"myNIC\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  ip_configuration {\n    name                          = \"myNicConfiguration\"\n    subnet_id                     = azurerm_subnet.subnet.id\n    private_ip_address_allocation = \"Dynamic\"\n    public_ip_address_id          = azurerm_public_ip.pip.id\n  }\n\n}\n\n# 6. Create Virtual Machine with User Data\nresource \"azurerm_linux_virtual_machine\" \"vm\" {\n  name                = \"myVM\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n  network_interface_ids = [azurerm_network_interface.nic.id]\n  size                = \"Standard_B1ms\"\n\n  admin_username = \"azureuser\"\n\n  os_disk {\n    caching              = \"ReadWrite\"\n    storage_account_type = \"Standard_LRS\"\n  }\n\n  source_image_reference {\n    publisher = \"Canonical\"\n    offer     = \"UbuntuServer\"\n    sku       = \"18.04-LTS\"\n    version   = \"latest\"\n  }\n\n  admin_ssh_key {\n    username   = \"azureuser\"\n    public_key = tls_private_key.rsa-4096.public_key_openssh\n  }\n\n  disable_password_authentication = true\n\n  custom_data = base64encode(file(\"script.sh\"))\n}\n\nresource \"azurerm_network_interface_security_group_association\" \"example\" {\n  network_interface_id      = azurerm_network_interface.nic.id\n  network_security_group_id = azurerm_network_security_group.nsg.id\n}\n\nresource \"azurerm_network_security_group\" \"nsg\" {\n  name                = \"myNSG\"\n  location            = azurerm_resource_group.rg.location\n  resource_group_name = azurerm_resource_group.rg.name\n\n  security_rule {\n    name                       = \"Allow-HTTP-Inbound\"\n    priority                   = 100\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"80\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTP traffic using the Http tag\"\n   \n  }\n\n  security_rule {\n    name                       = \"Allow-HTTPS-Inbound\"\n    priority                   = 110\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"443\"\n    source_address_prefix     = \"AzureFrontDoor.Backend\"\n    destination_address_prefix = \"*\"\n    description               = \"Allow inbound HTTPS traffic using the Https tag\"\n  \n  }\n\n  security_rule {\n    name                       = \"Allow-SSH\"\n    priority                   = 120\n    direction                  = \"Inbound\"\n    access                     = \"Allow\"\n    protocol                  = \"Tcp\"\n    source_port_range         = \"*\"\n    destination_port_range    = \"22\"\n    source_address_prefix     = \"*\"\n    destination_address_prefix = \"*\"\n  }\n}\n\n\n\ndata \"azurerm_client_config\" \"current\" {}\n\n\n# Output the public IP of the instance\noutput \"instance_ip\" {\n  value = <<EOF\n************************************************************************\n| 🖥️ Machine Ip: ${azurerm_linux_virtual_machine.vm.public_ip_address} |\n************************************************************************\nEOF\n}\n\n# Output the Username of the instance\noutput \"username\" {\n  value = <<EOF\n*************************************\n| 👤 Username of Machine: azureuser |\n*************************************\nEOF\n}\n\noutput \"destroy_infra\" {\n  value = <<EOF\n**************************************************************\n| 🗑️\tCommand: redinfracraft.py destroy azure payload pwndrop |\n**************************************************************\nEOF \n}"
  },
  {
    "path": "redinfracraft/Terraform/Azure/Azure_Pwndrop_Payload_Server/script.sh",
    "content": "#!/bin/bash\n\nsudo apt update\n\ncd /home/azureuser\n\nsudo apt install -y wget\nwget https://github.com/kgretzky/pwndrop/releases/download/1.0.1/pwndrop-linux-amd64.tar.gz\ntar zxvf pwndrop-linux-amd64.tar.gz "
  },
  {
    "path": "redinfracraft/Terraform/GCP/GCP_Mythic_C2_with_ELB/mythic.tf",
    "content": "provider \"google\" {\n  project = \"${var.project_id}\"\n  region  = var.location\n}\n\nvariable \"location\" {\n  description = \"GCP Location for Cloud Function\"\n}\n\nvariable \"project_id\" {\n  description = \"GCP Project ID\"\n}\n\nresource \"google_compute_instance\" \"default\" {\n  name         = \"test-instance\"\n  machine_type = \"n2-standard-2\"\n  zone         = \"us-central1-c\"\n\n  tags = [\"foo\", \"bar\"]\n\n  boot_disk {\n    initialize_params {\n      image = \"debian-cloud/debian-11\"\n      labels = {\n        my_label = \"value\"\n      }\n    }\n  }\n\n  // Local SSD disk\n  scratch_disk {\n    interface = \"NVME\"\n  }\n\n  network_interface {\n    network = \"default\"\n\n    access_config {\n      // Ephemeral public IP\n    }\n  }\n\n  metadata = {\n    foo = \"bar\"\n  }\n\n\n\n\n  service_account {\n    # Google recommends custom service accounts that have cloud-platform scope and permissions granted via IAM Roles.\n    email  = \"517443832736-compute@developer.gserviceaccount.com\"\n    scopes = [\"cloud-platform\"]\n  }\n}\n\n# Allow HTTP traffic\nresource \"google_compute_firewall\" \"allow_http\" {\n  name    = \"allow-http\"\n  network = \"default\"\n\n  allow {\n    protocol = \"tcp\"\n    ports    = [\"80\"]\n  }\n\n  source_ranges = [\"34.49.246.127/32\"]\n  target_tags   = [\"foo\", \"bar\"]\n}\n\n# Allow HTTPS traffic\nresource \"google_compute_firewall\" \"allow_https\" {\n  name    = \"allow-https\"\n  network = \"default\"\n\n  allow {\n    protocol = \"tcp\"\n    ports    = [\"443\"]\n  }\n\n  source_ranges = [google_compute_global_address.default.address]\n  target_tags   = [\"foo\", \"bar\"]\n}\n\n# Allow Load Balancer Health Checks\nresource \"google_compute_firewall\" \"allow_health_checks\" {\n  name    = \"allow-health-checks\"\n  network = \"default\"\n\n  allow {\n    protocol = \"tcp\"\n    ports    = [\"80\", \"443\"]\n  }\n\n  source_ranges = [\n    \"130.211.0.0/22\",\n    \"35.191.0.0/16\",\n    \"108.170.220.0/23\",\n    \"108.170.221.0/24\"\n  ]\n  target_tags   = [\"foo\", \"bar\"]\n}\n\n\nresource \"google_compute_instance_group\" \"webservers\" {\n  name        = \"test-webservers\"\n  description = \"Terraform test instance group\"\n\n  instances = [\n    google_compute_instance.default.id,\n  ]\n\n  named_port {\n    name = \"http\"\n    port = \"80\"\n  }\n\n  zone = \"us-central1-c\"\n}\n\n\n# Create a Global HTTP Load Balancer\nresource \"google_compute_global_address\" \"default\" {\n  name = \"testelb\"\n}\n\n# Backend Service using the Instance Group\nresource \"google_compute_backend_service\" \"default\" {\n  name          = \"test-backend-service\"\n  health_checks = [google_compute_health_check.default.id]\n\n  backend {\n    group = google_compute_instance_group.webservers.id\n  }\n}\n\n# Health Check for the Backend\nresource \"google_compute_health_check\" \"default\" {\n  name = \"test-health-check\"\n\n  tcp_health_check {\n    port = 80\n  }\n}\n\n# URL Map (Default Routing)\nresource \"google_compute_url_map\" \"default\" {\n  name            = \"test-url-map\"\n  default_service = google_compute_backend_service.default.id\n}\n\n# Target HTTP Proxy\nresource \"google_compute_target_http_proxy\" \"default\" {\n  name    = \"test-target-proxy\"\n  url_map = google_compute_url_map.default.id\n}\n\n# Global Forwarding Rule (Frontend)\nresource \"google_compute_global_forwarding_rule\" \"default\" {\n  name       = \"test-forwarding-rule\"\n  target     = google_compute_target_http_proxy.default.id\n  port_range = \"80\"\n  ip_address = google_compute_global_address.default.address\n}\n"
  },
  {
    "path": "redinfracraft/Terraform/GCP/GCP_Mythic_C2_with_ELB/script.sh",
    "content": "#!/bin/bash\nset -ex\n\nmkdir /home/access\ncd /home/access\n\nsudo mkdir -p /etc/apt/keyrings\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null\n\nsudo apt update -y\n\n\necho \"deb [signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bullseye stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nsudo apt update -y\nsudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\nsudo git clone https://github.com/its-a-feature/Mythic\nsudo apt-get install -y make\n\ncd /home/access/Mythic\nsudo make\n\nsudo /home/access/Mythic/mythic-cli install github https://github.com/MythicC2Profiles/http\nsudo /home/access/Mythic/mythic-cli install github https://github.com/MythicAgents/Apollo.git\nsudo /home/access/Mythic/mythic-cli start\n"
  },
  {
    "path": "redinfracraft/Terraform/terraform.auto.tfvars",
    "content": "# AWS Authentication\naccess_key = \"YOUR_ACCESS_KEY_ID\"\nsecret_key = \"YOUR_SECRET_ACCESS_KEY\"\nregion     = \"YOUR_AWS_REGION\"\n# EC2 Secret File Name without.PEM\nkey_name = \"EC2_PEM_FILE_NAME\"\n\n\n# Azure Authentication\nsubscription_id = \"YOUR_SUBSCRIPTION_ID\"\nclient_id = \"_YOUR_CLIENT_ID\"\nclient_secret = \"YOUR_CLIENT_SECRET\"\ntenant_id = \"YOUR_TENANT_ID\"\n# VM Secret File Name without.PEM\nvm_key_name = \"EC2_PEM_FILE_NAME\"\n\n\n# GCP Authentication\nproject_id = \"YOUR_PROJECT_ID\"\nlocation = \"YOUR_GCP_LOCATION\""
  },
  {
    "path": "redinfracraft/redinfracraft.py",
    "content": "import argparse\nimport os\n\ncurrent_dir = os.getcwd()\ntfvars_file = os.path.join(current_dir, \"Terraform\", \"terraform.auto.tfvars\")\n\n\ndef change_directory(path):\n    # Use os.path.join to handle cross-platform paths\n    target_path = os.path.join(current_dir, path)\n    os.chdir(target_path)\n\n\ndef createTerrformCommand():\n    os.system('terraform init')\n    os.system(f'terraform apply -auto-approve -var-file={tfvars_file}')\n\n\ndef destroyTerrformCommand():\n    os.system('terraform init')\n    os.system(f'terraform destroy -auto-approve -var-file={tfvars_file}')\n\n\n# Function to deploy Mythic C2 for AWS\ndef deploy_mythic_c2_aws():\n    change_directory(\"Terraform/AWS/AWS_Mythic_C2\")\n    createTerrformCommand()\n\n\n# Function to deploy Mythic C2 for Azure\ndef deploy_mythic_c2_azure():\n    change_directory(\"Terraform/Azure/Azure_Mythic_C2\")\n    createTerrformCommand()\n\n\n# Function to deploy Mythic C2 with ELB and CloudFront for AWS\ndef deploy_elb_c2_aws():\n    change_directory(\"Terraform/AWS/AWS_Mythic_C2_with_CloudFront\")\n    createTerrformCommand()\n\n\n# Function to deploy Mythic C2 with Frontdoor for Azure\ndef deploy_elb_c2_azure():\n    change_directory(\"Terraform/Azure/Azure_Mythic_C2_with_Frontdoor\")\n    createTerrformCommand()\n\n\n# Function to deploy Mythic C2 with ELB for GCP\ndef deploy_elb_c2_gcp():\n    change_directory(\"Terraform/GCP/GCP_Mythic_C2_with_ELB\")\n    createTerrformCommand()\n\n\n# Function to deploy Pwndrop for AWS\ndef deploy_pwndrop_aws():\n    change_directory(\"Terraform/AWS/AWS_Pwndrop_Payload_Server\")\n    createTerrformCommand()\n\n\n# Function to deploy Pwndrop for Azure\ndef deploy_pwndrop_azure():\n    change_directory(\"Terraform/Azure/Azure_Pwndrop_Payload_Server\")\n    createTerrformCommand()\n\n\n# Function to deploy gophish for AWS\ndef deploy_gophish_aws():\n    change_directory(\"Terraform/AWS/AWS_GoPhish_Phishing_Server\")\n    createTerrformCommand()\n\n\n# Function to deploy gophish for Azure\ndef deploy_gophish_azure():\n    change_directory(\"Terraform/Azure/Azure_GoPhish_Phishing_Server\")\n    createTerrformCommand()\n\n\n# Function to deploy Evilginx for AWS\ndef deploy_evilginx_aws():\n    change_directory(\"Terraform/AWS/AWS_Evilginx_Phishing_Server\")\n    createTerrformCommand()\n\n\n# Function to deploy Evilginx for Azure\ndef deploy_evilginx_azure():\n    change_directory(\"Terraform/Azure/Azure_Evilginx_Phishing_Server\")\n    createTerrformCommand()\n\n\n# Function to destroy Mythic C2 for AWS\ndef destroy_mythic_c2_aws():\n    change_directory(\"Terraform/AWS/AWS_Mythic_C2\")\n    destroyTerrformCommand()\n\n\n# Function to destroy Mythic C2 for Azure\ndef destroy_mythic_c2_azure():\n    change_directory(\"Terraform/Azure/Azure_Mythic_C2\")\n    destroyTerrformCommand()\n\n\n# Function to destroy Mythic C2 with ELB and CloudFront for AWS\ndef destroy_elb_c2_aws():\n    change_directory(\"Terraform/AWS/AWS_Mythic_C2_with_CloudFront\")\n    destroyTerrformCommand()\n\n\n# Function to destroy Mythic C2 with Frontdoor for Azure\ndef destroy_elb_c2_azure():\n    change_directory(\"Terraform/Azure/Azure_Mythic_C2_with_Frontdoor\")\n    destroyTerrformCommand()\n\n\n# Function to destroy Mythic C2 with ELB for GCP\ndef destroy_elb_c2_gcp():\n    change_directory(\"Terraform/GCP/GCP_Mythic_C2_with_Frontdoor\")\n    destroyTerrformCommand()\n\n# Function to destroy Pwndrop for AWS\ndef destroy_pwndrop_aws():\n    change_directory(\"Terraform/AWS/AWS_Pwndrop_Payload_Server\")\n    destroyTerrformCommand()\n\n\n# Function to destroy Pwndrop for Azure\ndef destroy_pwndrop_azure():\n    change_directory(\"Terraform/Azure/Azure_Pwndrop_Payload_Server\")\n    destroyTerrformCommand()\n\n\n# Function to destroy gophish for AWS\ndef destroy_gophish_aws():\n    change_directory(\"Terraform/AWS/AWS_GoPhish_Phishing_Server\")\n    destroyTerrformCommand()\n\n\n# Function to destroy GoPhish for Azure\ndef destroy_gophish_azure():\n    change_directory(\"Terraform/Azure/Azure_GoPhish_Phishing_Server\")\n    destroyTerrformCommand()\n\n\n# Function to destroy Evilginx for AWS\ndef destroy_evilginx_aws():\n    change_directory(\"Terraform/AWS/AWS_Evilginx_Phishing_Server\")\n    destroyTerrformCommand()\n\n\n# Function to destroy Evilginx for Azure\ndef destroy_evilginx_azure():\n    change_directory(\"Terraform/Azure/Azure_Evilginx_Phishing_Server\")\n    destroyTerrformCommand()\n\n\n# Main function\ndef main():\n    parser = argparse.ArgumentParser(description='Tool for deploying or destroying infrastructure.')\n    subparsers = parser.add_subparsers(dest='action', help='Action to perform')\n\n    # Sub-parser for creating infrastructure\n    parser_create = subparsers.add_parser('create', help='To Create infrastructure')\n    parser_create.add_argument('cloud', choices=['aws', 'azure', 'gcp'], help='Cloud provider (aws/azure/gcp)')\n    parser_create.add_argument('infra', choices=['c2', 'payload', 'phishing', 'full_infra'],\n                               help='Infrastructure to create')\n    parser_create.add_argument('type', nargs='?', choices=['mythic', 'mythic_lb', 'pwndrop', 'gophish', 'evilginx'],\n                               help='Type of infrastructure')\n\n    # Sub-parser for destroying infrastructure\n    parser_destroy = subparsers.add_parser('destroy', help='To Destroy infrastructure')\n    parser_destroy.add_argument('cloud', choices=['aws', 'azure', 'gcp'], help='Cloud provider (aws/azure/gcp)')\n    parser_destroy.add_argument('infra', choices=['c2', 'payload', 'phishing', 'full_infra'],\n                                help='Infrastructure to destroy')\n    parser_destroy.add_argument('type', nargs='?', choices=['mythic', 'mythic_lb', 'pwndrop', 'gophish', 'evilginx'],\n                                help='Type of infrastructure to destroy')\n\n    # Add info command\n    parser_info = subparsers.add_parser('info',\n                                        help='Shows info message, Try \"redinfracraft.py.py info\" to know more about this tool.')\n\n    # Add help command\n    parser_help = subparsers.add_parser('help',\n                                        help='Shows help message, Try \"redinfracraft.py.py help\" to view available options.')\n\n    args = parser.parse_args()\n\n    # Mapping infrastructure and cloud types to functions\n    action_map = {\n        'create': {\n            'aws': {\n                'c2': {'mythic': deploy_mythic_c2_aws, 'mythic_lb': deploy_elb_c2_aws},\n                'payload': {'pwndrop': deploy_pwndrop_aws},\n                'phishing': {'gophish': deploy_gophish_aws, 'evilginx': deploy_evilginx_aws},\n                'full_infra': lambda: (\n                deploy_elb_c2_aws(), deploy_pwndrop_aws(), deploy_gophish_aws(), deploy_evilginx_aws())\n            },\n            'azure': {\n                'c2': {'mythic': deploy_mythic_c2_azure, 'mythic_lb': deploy_elb_c2_azure},\n                'payload': {'pwndrop': deploy_pwndrop_azure},\n                'phishing': {'gophish': deploy_gophish_azure, 'evilginx': deploy_evilginx_azure},\n                'full_infra': lambda: (\n                deploy_elb_c2_azure(), deploy_pwndrop_azure(), deploy_gophish_azure(), deploy_evilginx_azure())\n            },\n            'gcp': {\n                'c2': {'mythic_lb': deploy_elb_c2_gcp}\n            }\n        },\n        'destroy': {\n            'aws': {\n                'c2': {'mythic': destroy_mythic_c2_aws, 'mythic_lb': destroy_elb_c2_aws},\n                'payload': {'pwndrop': destroy_pwndrop_aws},\n                'phishing': {'gophish': destroy_gophish_aws, 'evilginx': destroy_evilginx_aws},\n                'full_infra': lambda: (\n                destroy_elb_c2_aws(), destroy_pwndrop_aws(), destroy_gophish_aws(), destroy_evilginx_aws())\n            },\n            'azure': {\n                'c2': {'mythic': destroy_mythic_c2_azure, 'mythic_lb': destroy_elb_c2_azure},\n                'payload': {'pwndrop': destroy_pwndrop_azure},\n                'phishing': {'gophish': destroy_gophish_azure, 'evilginx': destroy_evilginx_azure},\n                'full_infra': lambda: (\n                destroy_elb_c2_azure(), destroy_pwndrop_azure(), destroy_gophish_azure(), destroy_evilginx_azure())\n            },\n            'gcp': {\n                'c2': {'mythic_lb': destroy_elb_c2_gcp},\n            }\n        }\n    }\n\n    # Execute the mapped function\n    if args.action in action_map:\n        try:\n            if args.infra == 'full_infra':\n                action_map[args.action][args.cloud][args.infra]()\n            else:\n                action_map[args.action][args.cloud][args.infra][args.type]()\n        except KeyError:\n            print(\"\"\"\n    Invalid combination of arguments!!\n\n    I am here to assist You :)\n\n        Try \"redinfracraft.py info\" to know more about this tool.\n\n        Try \"redinfracraft.py --help\" to know about arguments.\n\n        Try \"redinfracraft.py help\" to view available options. \n                    \"\"\")\n    elif args.action == 'info':\n        print_info_message()\n    elif args.action == 'help':\n        print_help_message()\n\n\n\ndef print_info_message():\n    print(\"\"\" \n\n**********************************************************************************************************************************************************\n*    ________   _______   _____     _________   ___         _   _______   ________     ----       _______   ________     ----     _______   _________    *   \n*   (  ____  ) (  _____) (  __ \\   (___   ___) (   \\       | ) (  _____) (  ____  )   / __ \\     / ______) (  ____  )   / __ \\   (  _____) (___   ___)   *     \n*   | |    | | | (       | (  \\ \\      | |     | |\\ \\      | | | (       | |    | |  / /  \\ \\   / /        | |    | |  / /  \\ \\  | (           | |       *\n*   | |____| | | |       | |   \\ \\     | |     | | \\ \\     | | | |       | |____| | | |    | | / /         | |____| | | |    | | | |           | |       *\n*   | _  ____) | (_____  | |    \\ \\    | |     | |  \\ \\    | | | (_____  | _  ____) | (____) | | |         | _  ____) | (____) | | (_____      | |       *\n*   | |\\ \\     |  _____) | |    | |    | |     | |   \\ \\   | | |  _____) | |\\ \\     |  ____  | | |         | |\\ \\     |  ____  | |  _____)     | |       *  \n*   | | \\ \\    | (       | |    / /    | |     | |    \\ \\  | | | (       | | \\ \\    | (    ) | | |         | | \\ \\    | (    ) | | (           | |       *\n*   | |  \\ \\   | |       | |   / /     | |     | |     \\ \\ | | | |       | |  \\ \\   | |    | | \\ \\         | |  \\ \\   | |    | | | |           | |       *  \n*   | |   \\ \\  | (_____  | (__/ /   ___| |___  | |      \\ \\| | | |       | |   \\ \\  | |    | |  \\ \\______  | |   \\ \\  | |    | | | |           | |       * \n*   (_|    \\_\\ (_______) (_____/   (_________) (_|       \\___) (_|       (_|    \\_\\ (_|    |_)   \\_______) (_|    \\_\\ (_|    |_) (_|           |_|       *     \n*                                                                                                                                                        *\n*                                                                                                                                         - Version-2    *\n*                                                                                                                                                        *\n********************************************************************************************************************************************************** \n\n\n\n                       Introducing RedInfraCraft (V2) - your go-to tool for seamlessly crafting and overseeing cloud infrastructures, tailored \n            specifically for Red Teamers!! With RedInfraCraft (V2), you're not just deploying some infrastructures; you are crafting a digital \n            masterpiece. Whether you're forging Mythic C2s, shaping ELB architectures, or crafting cunning phishing setups, RedInfraCraft (V2) \n            empowers you to build, deploy, and manage with unparalleled ease. Let's turn your cloud dreams into infrastructural realities with \n            RedInfraCraft (V2) - where every deployment is a stroke of genius!\"\n\n                                                                                                             - CyberWarFare Labs\n\n    \"\"\")\n\n\ndef print_help_message():\n    print(\"\"\"\n\nInfrastructures:\n\n    1) C2 - \"Mythic C2\", \"Mythic C2 with CloudFront and Load Balancer\", \"Mythic C2 with Frontdoor & CDN\"\n    2) Payload - \"Pwndrop\"\n    3) Phishing - \"EvilGinx\", \"GoPhish\"\n    4) All in One Infra - \"Mythic C2 with CloudFront and Load Balancer, Pwndrop, EvilGinx, GoPhish\", \"Mythic C2 with Frontdoor & CDN, pwndrop, Gophish, and Evilginx\"     \n\n\nCloud Providers:\n    1) AWS\n    2) Azure\n    3) GCP\n\n\nCommand Explanation:\n    --> redinfracraft.py  action  cloud_provider  infra_type  infra\n    E.g redinfracraft.py  create       aws            c2      mythic\n    E.g redinfracraft.py  destroy      azure          c2      mythic\n    E.g redinfracraft.py  create       gcp            c2      mythic\n\n\nCommands to Create Infrastructure:\n\n    --> Create Mythic C2 infrastructure for AWS:\n            redinfracraft.py create aws c2 mythic \n\n    --> Create Mythic C2 infrastructure for Azure:\n            redinfracraft.py create azure c2 mythic\n\n    --> Create ELB with Mythic C2 infrastructure for AWS:\n            redinfracraft.py create aws c2 mythic_lb\n\n    --> Create ELB with Mythic C2 infrastructure for Azure:\n            redinfracraft.py create azure c2 mythic_lb\n            \n    --> Create ELB with Mythic C2 infrastructure for GCP:\n            redinfracraft.py create gcp c2 mythic_lb\n\n    --> Create pwndrop payload infrastructure for AWS:\n            redinfracraft.py create aws payload pwndrop\n\n    --> Create pwndrop payload infrastructure for Azure:\n            redinfracraft.py create azure payload pwndrop\n\n    --> Create Gophish phishing infrastructure for AWS:\n            redinfracraft.py create aws phishing gophish\n\n    --> Create Gophish phishing infrastructure for Azure:\n            redinfracraft.py create azure phishing gophish\n\n    --> Create Evilginx phishing infrastructure for AWS:\n            redinfracraft.py create aws phishing evilginx\n\n    --> Create Evilginx phishing infrastructure for Azure:\n            redinfracraft.py create azure phishing evilginx\n\n    --> Create full infrastructure (Mythic C2 with ELB & CloudFront, pwndrop, Gophish, and Evilginx):\n            redinfracraft.py create aws full_infra\n\n    --> Create full infrastructure (Mythic C2 with Frontdoor & CDN, pwndrop, Gophish, and Evilginx):\n            redinfracraft.py create azure full_infra\n\n\nCommands to Destroy Infrastructure:\n    --> Destroy Mythic C2 infrastructure for AWS:\n\n            redinfracraft.py destroy aws c2 mythic\n\n    --> Destroy Mythic C2 infrastructure for Azure:\n            redinfracraft.py destroy azure c2 mythic\n\n    --> Destroy ELB with Mythic C2 infrastructure for AWS:\n            redinfracraft.py destroy aws c2 mythic_lb\n\n    --> Destroy ELB with Mythic C2 infrastructure for Azure:\n            redinfracraft.py destroy azure c2 mythic_lb\n\n    --> Destroy ELB with Mythic C2 infrastructure for GCP:\n            redinfracraft.py destroy gcp c2 mythic_lb\n\n    --> Destroy pwndrop payload infrastructure for AWS:\n            redinfracraft.py destroy aws payload pwndrop\n\n    --> Destroy pwndrop payload infrastructure for Azure:\n            redinfracraft.py destroy azure payload pwndrop\n\n    --> Destroy GoPhish phishing infrastructure for AWS:\n            redinfracraft.py destroy aws phishing gophish\n\n    --> Destroy GoPhish phishing infrastructure for Azure:\n            redinfracraft.py destroy azure phishing gophish\n\n    --> Destroy EvilGinx phishing infrastructure for AWS:\n            redinfracraft.py destroy aws phishing evilginx\n\n    --> Destroy EvilGinx phishing infrastructure for Azure:\n            redinfracraft.py destroy azure phishing evilginx     \n\n    --> Destroy full infrastructure (Mythic C2 with ELB & CloudFront, pwndrop, Gophish, and Evilginx):\n            redinfracraft.py destroy aws full_infra\n\n    --> Destroy full infrastructure (Mythic C2 with Frontdoor & CDN, pwndrop, Gophish, and Evilginx):\n            redinfracraft.py destroy azure full_infra\n    \"\"\")\n\n\n# Execute main function\nif __name__ == \"__main__\":\n    main()"
  }
]