Git Product home page Git Product logo

mutablesecurity's Introduction

Cover



Description ๐Ÿ–ผ๏ธ

Background ๐Ÿ‘ด๐Ÿผ

In today's fast-paced society, most people are unaware of the potential consequences of cyberattacks on their organizations. Furthermore, they do not invest in cybersecurity solutions due to the costs of setup, licensing, and maintenance.

Vision ๐Ÿ“œ

MutableSecurity ๐Ÿ—๏ธ is a software product for making cybersecurity solution management easier and more accessible, from deployment and configuration to monitoring.

Despite the current lack of complex functionalities, we have a vision in mind that we hope to achieve in the near future. As we must begin somewhere, the first step in our progress is this command line interface for automatic management of cybersecurity solutions.

Come join the MutableSecurity journey!

Concepts ๐Ÿ’ฌ

MutableSecurity implements and operates on a few concepts:

  • Target host (or target machine): A computer where the actions will be performed. Can be the local machine or remote one.
  • Solution: A cybersecurity solution that needs to be set up on a target machine.
  • Operation: A manipulation of a solution that is installed or needs to be installed. Could vary from effective installation to testing.
  • Solution's lifecycle: States in which a solution exists. MutableSecurity implements a set of operations for each state.
  • Configuration: A set of parameters (in pairs of aspect and value) specific to the solution. Can be initial, if it is used in the deployment process, or production, if it accompanies the solution on the target host and stores its current configuration.
  • Logs: Logging messages generated by the solution, relevant to understand its functioning.
  • Stats: Metrics offered by the installed solution, relevant to measure the protection provided to the machine.

Solutions' Lifecycle. Operations โญ•

Stage Operation Description
Deployment Initial Configuration Setting Sets an aspect of the initial configuration used during the installation process.
Install Installs the solution in the target host.
Test Tests the proper functioning of the newly installed solution.
Production* Production Configuration Retrieval Retrieves the production configuration of the running solution
Production Configuration Setting Sets an aspect of the production configuration.
Logs Retrieval Retrieves the logs generated by the solution.
Stats Retrieval Retrieves the stats generated by the solution.
Test Tests the proper functioning of the running solution.
Update Updates the solution to its latest version.
Disconnection Uninstall Uninstalls the solution from the target host.

* All the operations listed in the production stage are optional and can be executed in any order.

Functionalities ๐Ÿš€

  • Three solution supported so far (and more under development)
  • Local or remote (via password-based or key-based SSH) deployment
  • Deployment to multiple hosts, in parallel
  • Intuitive command line interface

Supported Cybersecurity Solutions ๐Ÿ“ฆ

Supported Solution Short Description Supported Environment
Open source real-time HTTP intrusion detection system โ€ข Ubuntu 20.04 LTS or above
โ€ข nginx
TLS certificates generation using a nonprofit Certificate Authority โ€ข Ubuntu 20.04 LTS or above
โ€ข nginx
Open source network intrusion detection and prevention system โ€ข Ubuntu 20.04 LTS or above
More coming soon...

Installation ๐Ÿฅก

The easiest way to install MutableSecurity is from PyPI. Just run pip install mutablesecurity and you'll have everything set!

Requirements ๐Ÿฅข

The only requirements are Python 3.9 and pip.

To avoid warnings when using pip to install Python scripts, add /home/<username>/.local/bin (where <username> identifies the current user) to your $PATH variable.

Usage and Demos ๐Ÿชœ

0๏ธโƒฃ Get help.

Syntax

mutablesecurity --help or mutablesecurity --solution <solution> --help

Example

โžœ mutablesecurity --help

              _        _     _      __                      _ _         
  /\/\  _   _| |_ __ _| |__ | | ___/ _\ ___  ___ _   _ _ __(_| |_ _   _ 
 /    \| | | | __/ _` | '_ \| |/ _ \ \ / _ \/ __| | | | '__| | __| | | |
/ /\/\ | |_| | || (_| | |_) | |  ___\ |  __| (__| |_| | |  | | |_| |_| |
\/    \/\__,_|\__\__,_|_.__/|_|\___\__/\___|\___|\__,_|_|  |_|\__|\__, |
     Seamless deployment and management of cybersecurity solutions |___/ 

Usage: mutablesecurity [OPTIONS]

Options:
  -r, --remote TEXT               Connect to remote in the
                                  USERNAME@HOSTNAME:PORT format. If ommited,
                                  the operations are executed locally.
  -s, --solution [SURICATA]       Solution to manage
  -o, --operation [GET_CONFIGURATION|GET_LOGS|GET_STATS|INSTALL|SET_CONFIGURATION|TEST|UNINSTALL|UPDATE]
                                  Operation to perform
  -a, --aspect TEXT               Configuration's aspect to modify. Available
                                  only with a value (--value)
  -v, --value TEXT                New value of the configuration's aspect.
                                  Available only with an aspect (--aspect).
  --verbose                       Increase in the logging volume
  -h, --help                      Useful information for using MutableSecurity
                                  or about a solution
โžœ mutablesecurity --solution SURICATA --help

              _        _     _      __                      _ _         
  /\/\  _   _| |_ __ _| |__ | | ___/ _\ ___  ___ _   _ _ __(_| |_ _   _ 
 /    \| | | | __/ _` | '_ \| |/ _ \ \ / _ \/ __| | | | '__| | __| | | |
/ /\/\ | |_| | || (_| | |_) | |  ___\ |  __| (__| |_| | |  | | |_| |_| |
\/    \/\__,_|\__\__,_|_.__/|_|\___\__/\___|\___|\__,_|_|  |_|\__|\__, |
     Seamless deployment and management of cybersecurity solutions |___/  

Full name: Suricata Intrusion Detection and Prevention System

Description:
Suricata is the leading independent open source threat detection engine. By combining intrusion detection (IDS), intrusion prevention (IPS), network 
security monitoring (NSM) and PCAP processing, Suricata can quickly identify, stop, and assess even the most sophisticated attacks.

References:
- https://suricata.io
- https://github.com/OISF/suricata

Configuration:
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Aspect            โ”ƒ Type โ”ƒ  Possible Values  โ”ƒ Description                          โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ interface         โ”‚ str  โ”‚         *         โ”‚ Interface on which Suricata listens  โ”‚
โ”‚ automatic_updates โ”‚ str  โ”‚ ENABLED, DISABLED โ”‚ State of the automatic daily updates โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1๏ธโƒฃ Install a solution.

Syntax

mutablesecurity --solution <solution> --operation INSTALL

Example

โžœ mutablesecurity --solution SURICATA --operation INSTALL  
๐Ÿ” Password for localhost: 
โœ… Suricata is now installed on this machine.

Optional: To connect to a remote host via a privileged user, just add the --remote flag.

โžœ mutablesecurity --remote [email protected]:22 --solution SURICATA --operation INSTALL  
๐Ÿ” Password for [email protected]:22:
โœ… Suricata is now installed on this machine.
2๏ธโƒฃ Test the solution.

Syntax

mutablesecurity --solution <solution> --operation TEST

Example

โžœ mutablesecurity --solution SURICATA --operation TEST             
๐Ÿ” Password for localhost: 
โœ… Suricata works as expected.
3๏ธโƒฃ Get the production configuration.

Syntax

mutablesecurity --solution <solution> --operation GET_CONFIGURATION

Example

โžœ mutablesecurity --solution SURICATA --operation GET_CONFIGURATION
๐Ÿ” Password for localhost: 
โœ… The configuration of Suricata was retrieved.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Attribute         โ”ƒ Value    โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ automatic_updates โ”‚ DISABLED โ”‚
โ”‚ interface         โ”‚ enp0s3   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
4๏ธโƒฃ Modify the production configuration.

Syntax

mutablesecurity --solution <solution> --operation SET_CONFIGURATION --aspect <aspect> --value <value>

Example

โžœ mutablesecurity --solution SURICATA --operation SET_CONFIGURATION --aspect automatic_updates --value ENABLED    
๐Ÿ” Password for localhost: 
โœ… The configuration of Suricata was set.

Optional: To test the modifications, run the configuration retrieval and testing operations.

โžœ mutablesecurity --solution SURICATA --operation GET_CONFIGURATION               
๐Ÿ” Password for localhost: 
โœ… The configuration of Suricata was retrieved.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Attribute         โ”ƒ Value   โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ automatic_updates โ”‚ ENABLED โ”‚
โ”‚ interface         โ”‚ enp0s3  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โžœ mutablesecurity --solution SURICATA --operation TEST                                             
๐Ÿ” Password for localhost: 
โœ… Suricata works as expected.
5๏ธโƒฃ Retrieve the solution logs.

Syntax

mutablesecurity --solution <solution> --operation GET_LOGS

Example

โžœ mutablesecurity --solution SURICATA --operation GET_LOGS
๐Ÿ” Password for localhost: 
โœ… The logs of Suricata were retrieved.

[...]
04/18/2022-10:55:31.134760  [**] [1:2100498:7] GPL ATTACK_RESPONSE id check returned root [**] [Classification: Potentially Bad Traffic] [Priority: 2]
{TCP} 54.192.235.64:80 -> 10.0.2.15:50690
[...]
6๏ธโƒฃ Retrieve the solution statistics.

Syntax

mutablesecurity --solution <solution> --operation GET_STATS

Example

โžœ mutablesecurity --solution SURICATA --operation GET_STATS
๐Ÿ” Password for localhost: 
โœ… The stats of Suricata were retrieved.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Attribute                              โ”ƒ Value                   โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ Total number of alerts                 โ”‚ 5                       โ”‚
โ”‚ Total number of alerts generated today โ”‚ 5                       โ”‚
โ”‚ Uptime                                 โ”‚ 1 minute and 23 seconds โ”‚
โ”‚ Current installed version              โ”‚ 6.0.4 RELEASE           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
7๏ธโƒฃ Updates the solution.

Syntax

mutablesecurity --solution <solution> --operation UPDATE

Example

โžœ mutablesecurity --solution SURICATA --operation UPDATE        
๐Ÿ” Password for localhost: 
โœ… Suricata was updated to its latest version.
8๏ธโƒฃ Uninstall the solution.

Syntax

mutablesecurity --solution <solution> --operation UNINSTALL

Example

โžœ mutablesecurity --solution SURICATA --operation UNINSTALL        
๐Ÿ” Password for localhost: 
โœ… Suricata is no longer installed on this machine.

Support ๐Ÿ†˜

If you have any type of suggestion (for example, proposals for new functionalities or support for other security solutions), please open an issue or drop us a line at [email protected].

Contributing ๐Ÿค

To find out how you can contribute to this project, check out our contribution guide.

mutablesecurity's People

Contributors

antocialin avatar iosifache avatar

Forkers

ecogit-stage

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.