Skip to main content

Tool that checks the system capabilities

Project description

checkmaster

Server assessment tool of requirements like open ports, available commands and stuffs

Setup

pip install checkmaster

Usage

The parameter --debug ERROR will show only the errors and not the entire log

checkmaster -c example_conf.json --debug ERROR

Configuration file format conversions

checkmaster -c examples/example_conf.yaml --yaml-to-json
checkmaster -c examples/example_conf.json --json-to-yaml

Configuration file

json configuration file like

{
    "checkmaster.sockets.ingoing_port": [
        {"kind": "tcp", "port": 22, "addrs": ["0.0.0.0"]},
        {"kind": "tcp", "port": 8080, "addrs": ["0.0.0.0"]},
        {"kind": "tcp", "port": 8443, "addrs": ["0.0.0.0"]},
        {"kind": "tcp", "port": 80, "status": "CLOSED"},
        {"kind": "tcp", "port": 5044, "addrs": ["0.0.0.0"]},
        {"kind": "udp", "port": 1514},
        {"kind": "tcp", "port": 1515, "addrs": ["0.0.0.0"]}
    ],
    "checkmaster.sockets.outgoing_port": [
        {"addr": "that-host.net", "port":5150, "kind": "tcp", "timeout": 2},
        {"addr": "that-host.net", "port":443, "kind": "tcp", "timeout": 2},
        {"addr": "that-host.net", "port":5986, "kind": "tcp", "timeout": 2},
        {"addr": "that-host.net", "port":22, "kind": "tcp", "timeout": 2}
    ],
    "checkmaster.commands.run": [
        {"cmd": "ping -c 1 google.com", "exit_status":0, "stdout_regexp": "1 received", "stderr_regexp": ""}
    ],

    "checkmaster.hardware.cores": {"operator": "ge", "value": 8},
    "checkmaster.hardware.ram": {"kind": "free",  "operator": "ge", "value": 4, "unit": "GB"},

    "checkmaster.filesystems.size": [
        {"path":"/", "kind":"free", "value":"100", "unit": "GB", "operator":"ge"}
    ],

    "checkmaster.filesystems.paths": [
        {"kind": "file", "path":"./README.md", "status": "present", "permissions": "0664", "uid": 1000, "gid": 1000},
        {"kind": "file", "path":"README.txt", "status": "absent"},
        {"kind": "directory", "path":"READMEs", "status": "absent"}
    ]
}
yaml configuration file like ... Click to expand!
````
checkmaster.commands.run:
- cmd: ping -c 1 google.com
  exit_status: 0
  stderr_regexp: ''
  stdout_regexp: 1 received
checkmaster.filesystems.paths:
- gid: 1000
  kind: file
  path: ./README.md
  permissions: '0664'
  status: present
  uid: 1000
- kind: file
  path: README.txt
  status: absent
- kind: directory
  path: READMEs
  status: absent
checkmaster.filesystems.size:
- kind: free
  operator: ge
  path: /
  unit: GB
  value: '100'
checkmaster.hardware.cores:
  operator: ge
  value: 8
checkmaster.hardware.ram:
  kind: free
  operator: ge
  unit: GB
  value: 4
checkmaster.sockets.ingoing_port:
- addrs:
  - 0.0.0.0
  kind: tcp
  port: 22
- addrs:
  - 0.0.0.0
  kind: tcp
  port: 8080
- addrs:
  - 0.0.0.0
  kind: tcp
  port: 8443
- kind: tcp
  port: 80
  status: CLOSED
- addrs:
  - 0.0.0.0
  kind: tcp
  port: 5044
- kind: udp
  port: 1514
- addrs:
  - 0.0.0.0
  kind: tcp
  port: 1515
checkmaster.sockets.outgoing_port:
- addr: that-host.net
  kind: tcp
  port: 5150
  timeout: 2
- addr: that-host.net
  kind: tcp
  port: 443
  timeout: 2
- addr: that-host.net
  kind: tcp
  port: 5986
  timeout: 2
- addr: that-host.net
  kind: tcp
  port: 22
  timeout: 2
````

Contribute

Feel free to open new issues and pull requests

For Developers

As you can see each checmaster rule, in the example configuration json file, have a python package and a function name like checkmaster.sockets.ingoing_port where checkmaster.sockets is the python package and the function is ingoing_port.

This means that you can load and use your own package.function in checkmaster without any changes in the code!

Authors

  • Giuseppe De Marco
  • 4Securitas ACSIA Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checkmaster-0.3.0.post1.tar.gz (23.5 kB view details)

Uploaded Source

File details

Details for the file checkmaster-0.3.0.post1.tar.gz.

File metadata

  • Download URL: checkmaster-0.3.0.post1.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.10

File hashes

Hashes for checkmaster-0.3.0.post1.tar.gz
Algorithm Hash digest
SHA256 5bcc4500dc0e51d89beac8c5a7075fee399d75722e20341d6babd531d2905e82
MD5 c773675e26694c7b19b8f938680012d7
BLAKE2b-256 98b6616fa13caddb3bda3daedc8ca52daecf8ddff2ce387d880987ef31e91beb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page