safinsingh / malta

๐Ÿ” A cross-platform vulnerability scoring engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version License: MIT Made with Rust gh-actions PRs Welcome awesome


โœจ Installation

git clone https://github.com/safinsingh/malta.git
make release

๐Ÿ”ฎ In action

demo

๐Ÿ”Ž How it works

  • helios is malta's client engine, it finds and scores vulnerabilities specified in a configuration file (see the example helios/conf.yaml).
  • After capturing the secret keys generated by helios gen-keys, insert them into {helios/ares}/src/crypto.rs in order to encrypt/decrypt your configuration. After writing your configuration, you'll need to re-build the binaries with cargo build --release.
  • Notice that in the configuration, you'll need to specify the URL of a Firebase Realtime Database URL. This is where all scoring data will be appended.
  • Once built, you can run helios encrypt to encrypt your configuration. You can now safely delete your config.yaml and place the encrypted conf.z on both your server and client.
  • Now, start ares and distribute the scoring engine. Typically, this is done via the distribution of an insecure virtual machine with vulnerabilities preloaded.

If you allow your Firebase connection to be unauthenticated, make sure to set security rules to only allow the IP of your remote server running ares

๐Ÿ“– Checks

The check schema for helios looks like the following:

# Global constants
title: "Safin's OP Round"
remote: "http://localhost:8000/"
db: "https://malta-rs.firebaseio.com"

# Array of vulnerability records
records:
  # All vulnerabilities must have
  # a message, identifier, and points.
  # If the points are negative, it's
  # counted as a penalty
  - message: Removed vulnerability
    identifier: a1b2c3
    points: -4

    # Array of all checks
    checks:
      # Array of REQUIRED sucessful checks,
      # the following MUST be TRUE for the
      # check to pass
      - success:
          - type: FileContains
            file: "/home/safin/Documents/helios/hi.txt"
            contains: "^hello"

      # Array of REQUIRED sucessful checks,
      # the following MUST be FALSE for the
      # check to pass
      - fail:
          - type: FileContains
            file: "/home/safin/Documents/helios/hi2.txt"
            contains: "^hello"

helios currently supports many checks for both Windows and Unix-like operating systems:

// Score a file containing a regular expression.
pub struct FileContains {
    file: String,
    contains: String,
}
// Score a command exiting with a certain
// exit code. If a custom code is not specified,
// it defaults to 0.
pub struct CommandExitCode {
    command: String,
    code: Option<i32>,
}
// Score a command's STDOUT matching a
// regular expression.
pub struct CommandOutput {
    command: String,
    contains: String,
}
// Score a file that exists on the system.
pub struct FileExists {
    path: String,
}
// Score a user existing on the system.
// Currently only supports Unix-like operating systems.
pub struct UserExists {
    user: String,
}
// Score a group existing on the system.
// Currently only supports Unix-like operating systems.
pub struct GroupExists {
    group: String,
}
// Score a user existing in a group.
// Currently only supports Unix-like operating systems.
pub struct UserInGroup {
    user: String,
    group: String,
}
// Score the firewall status.
// Currently only supports Unix-like operating systems.
pub struct Firewall {}
// Score a systemd service being active.
// Currently only supports Unix-like operating systems.
pub struct Service {
    service: String,
}

๐Ÿ‘จโ€๐Ÿ’ป Author

Linkedin: Safin Singh
GitHub: safinsingh
Dribbble: Safin Singh
YouTube: Safin Singh

๐Ÿค Contributing

Contributions, PRs, issues and feature requests are welcome! Feel free to check out my issues page.

โค๏ธ Show your support

Give a โญ๏ธ if this project helped you! Hope you enjoy it!

About

๐Ÿ” A cross-platform vulnerability scoring engine

License:MIT License


Languages

Language:Rust 97.2%Language:Makefile 2.8%