All Projects â†’ grapheneX â†’ Graphenex

grapheneX / Graphenex

Licence: gpl-3.0
Automated System Hardening Framework

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Graphenex

Sulu
Core framework that implements the functionality of the Sulu content management system
Stars: ✭ 645 (-3.01%)
Mutual labels:  hacktoberfest
Vis Timeline
📈 Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
Stars: ✭ 654 (-1.65%)
Mutual labels:  hacktoberfest
Material Shell
A modern desktop interface for Linux. Improve your user experience and get rid of the anarchy of traditional desktop workflows. Designed to simplify navigation and reduce the need to manipulate windows in order to improve productivity. It's meant to be 100% predictable and bring the benefits of tools coveted by professionals to everyone.
Stars: ✭ 6,189 (+830.68%)
Mutual labels:  hacktoberfest
Pyjanitor
Clean APIs for data cleaning. Python implementation of R package Janitor
Stars: ✭ 647 (-2.71%)
Mutual labels:  hacktoberfest
Supervised Installer
Installer for a generic Linux system
Stars: ✭ 649 (-2.41%)
Mutual labels:  hacktoberfest
Clean Code Persian
ترجمه گروهی کتاب کدتمیز
Stars: ✭ 659 (-0.9%)
Mutual labels:  hacktoberfest
Gitextensions
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
Stars: ✭ 6,008 (+803.46%)
Mutual labels:  hacktoberfest
Awesome Checker Services
✅ List of links to the various checkers out there on the web for sites, domains, security etc.
Stars: ✭ 662 (-0.45%)
Mutual labels:  hacktoberfest
Lambdacd
a library to define a continuous delivery pipeline in code
Stars: ✭ 655 (-1.5%)
Mutual labels:  hacktoberfest
Taiga Back
Agile project management platform. Built on top of Django and AngularJS
Stars: ✭ 5,648 (+749.32%)
Mutual labels:  hacktoberfest
Kotlin Language Server
Intelligent Kotlin support for any editor/IDE using the Language Server Protocol
Stars: ✭ 650 (-2.26%)
Mutual labels:  hacktoberfest
Filterlists
🛡 The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.
Stars: ✭ 653 (-1.8%)
Mutual labels:  hacktoberfest
Concourse
Concourse is a container-based continuous thing-doer written in Go.
Stars: ✭ 6,070 (+812.78%)
Mutual labels:  hacktoberfest
Osem
Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.
Stars: ✭ 649 (-2.41%)
Mutual labels:  hacktoberfest
Zarr Python
An implementation of chunked, compressed, N-dimensional arrays for Python.
Stars: ✭ 658 (-1.05%)
Mutual labels:  hacktoberfest
Enclosure Picroft
Mycroft interface for Raspberry Pi environment
Stars: ✭ 649 (-2.41%)
Mutual labels:  hacktoberfest
Calamares
Distribution-independent installer framework
Stars: ✭ 654 (-1.65%)
Mutual labels:  hacktoberfest
Main
📦 The next-generation default bucket for Scoop.
Stars: ✭ 661 (-0.6%)
Mutual labels:  hacktoberfest
Free Tshirts Stickers And Swag For Developers
List of free tshirts, stickers and swags available for developers
Stars: ✭ 661 (-0.6%)
Mutual labels:  hacktoberfest
Gitql
💊 A git query language
Stars: ✭ 5,854 (+780.3%)
Mutual labels:  hacktoberfest

grapheneX

grapheneX Release

PyPI AUR Docker Build License

In computing, hardening is usually the process of securing a system by reducing its surface of vulnerability, which is larger when a system performs more functions; in principle a single-function system is more secure than a multipurpose one. Reducing available ways of attack typically includes changing default passwords, the removal of unnecessary software, unnecessary usernames or logins, and the disabling or removal of unnecessary services.

Although the current technology tries to design systems as safe as possible, security flaws and situations that can lead to vulnerabilities caused by unconscious use and missing configurations still exist. The user must be knowledgeable about the technical side of system architecture and should be aware of the importance of securing his/her system from vulnerabilities like this. Unfortunately, it's not possible to know all the details about hardening and necessary commands for every ordinary user and the hardening remains to be a technical issue due to the difficulty of understanding operating system internals. Therefore there are hardening checklists that contain various commands and rules of the specified operating system available such as trimstray/linux-hardening-checklist & Windows Server Hardening Checklist on the internet for providing a set of commands with their sections and of course simplifying the concept for the end user. But still, the user must know the commands and apply the hardening manually depending on the system. That's where the grapheneX exactly comes in play.

The project name is derived from the 'graphene'. Graphene is a one-atom-thick layer of carbon atoms arranged in a hexagonal lattice. In proportion to its thickness, it is about 100 times stronger than the strongest steel.

grapheneX project aims to provide a framework for securing the system with hardening commands automatically. It's designed for the end user as well as the Linux and Windows developers due to the interface options. (interactive shell/web interface) In addition to that, grapheneX can be used to secure a web server/application.

Hardening commands and the scopes of those commands are referred to modules and the namespaces in the project. They exist at the modules.json file after installation. ($PYPATH/site-packages/graphenex/modules.json) Additionally, it's possible to add, edit or remove modules and namespaces. Also, the hardening operation can be automated with the presets that contain a list of modules.

Currently, grapheneX support the hardening sections below. Each of these namespaces contains more than one module.

• Firewall
• User
• Network
• Services
• Kernel
• Filesystem
• Other

Listen to The Python Podcast.__init__: Automate Your Server Security With GrapheneX - Episode 237

Installation

You can install grapheneX with pip. Usually this is the easiest way:

pip install graphenex

Or if you get an error try:

python3 -m pip install graphenex

Additionally, poetry can be used for development:

poetry install        # install the dependencies
poetry run grapheneX  # run grapheneX

Dependencies

Usage

Command Line Arguments

usage: grapheneX [-h] [-v] [-w] [--open] [host:port]
positional arguments:
  host:port      host and port to run the web interface

optional arguments:
  -h, --help     show this help message and exit
  -v, --version  show version information
  -w, --web      run the grapheneX web server
  --open         open browser on web server start

Interactive Shell

Execute the grapheneX command in order to start the interactive shell.

GrapheneX Interactive Shell

• Animated gifs and screenshots added for demonstration and include the test execution of the unversioned grapheneX. Use grapheneX or python -m graphenex command for the execution.
• grapheneX currently supports Python3.7

Web Interface

Execute the grapheneX with the -w or --web argument in order to start the web server.

Starting the Web Server

• Web interface has the authentication system that requires an access token. Once the user verifies her/his identity with the given token at the shell, grapheneX creates a session for further use.

GrapheneX Web Interface I

GrapheneX Web Interface II

• The default host and port value are localhost:8080. It can be changed via the host:port argument as shown below.

python grapheneX.py -w 192.168.1.36:8090

• Use --open argument to open the browser after the server start.

python grapheneX.py -w --open

CLI Commands

Command Description
back Go back from namespace or module
clear Clear the terminal
exit Exit interactive shell
harden Execute the hardening command
help List available commands with "help" or show detailed help with "help <cmd>"
info Show information about the module
list List available hardening modules
manage Add, edit or delete module
preset Show/execute the hardening module presets
search Search for modules
switch Switch between modules or namespaces
use Use a hardening module
web Start the grapheneX web server

help

help or ? shows the commands list above.
help [CMD] shows the detailed usage of given command.

list

Show the available modules in a table. For example:

List Command

switch

switch command can be used to switch to a namespace or use a module. It's helpful if you want to see a list of modules in a namespace.

switch [NAMESPACE]

Switch Command

• Supports autocomplete for namespaces.

Also, using the switch command like this is possible:

switch [NAMESPACE]/[MODULE]

It's the equivalent of the use command in this situation.

use

Serves the purpose of selecting a hardening module.

use [MODULE]

Use Command

• Supports autocomplete for modules.

info

Shows information (namespace, description, OS command) about the selected module.

Info Command

harden

Executes the hardening command of the selected module.

Harden Command

preset

grapheneX has presets that contain particular modules for automating the hardening operation. Presets can be customized with the modules.json file and they can contain any supported module. preset command shows the available module presets and preset [PRESET] runs the hardening commands in a preset.

Show Presets

An example preset command output is shown above. Below, a preset that contains 2 modules is selected and hardening modules executed.

Preset Command

preset command supports autocomplete for preset names. Also, it supports an option for asking permission between each hardening command execution so that the user knows what he/she is doing.

• Adding module presets

Presets are stored in the presets element inside the modules.json file. This JSON file can be edited for updating the presets.

"presets": [
        {
            "name": "Preset_1",
            "modules": [
                "namespace1/Module_Name1",
                "namespace2/Module_Name2",
            ],
            "target_os": "linux/win"
        },
        {
            "name": "Preset_2",
            "modules": [
                "namespace/All"
            ],
            "target_os": "linux/win"
        }
    ]

namespace/All means every hardening command in that namespace will be executed.

search

search [QUERY]

Search Command

manage

manage command allows to add, edit or remove modules.

• Adding modules with manage

Follow the instructions for adding a new module. Choose the 'new' option in the namespace prompt for creating a new namespace.

Adding Module

• Adding modules manually

grapheneX stores the modules and namespaces in modules.json file. It will show up as a new module when a new element is created in this JSON file. An example element is given below.

"namespace": [
        {
            "name": "Module_Name",
            "desc": "This is the module description.",
            "command": "echo 'hardening command'",
            "require_superuser": "True/False",
            "target_os": "linux/win"
        }
    ]

It's recommended to add modules from CLI or the Web interface other than editing the modules.json file.

• Editing modules

Choose the edit option after the manage command for the editing the module properties.

Editing Module

Or edit the modules.json manually.

• Removing modules

Choosing the remove option in the manage menu will be enough for removing the specified module. It's also possible to remove the module from modules.json manually.

Removing Module

web

Starts the grapheneX web server with the optional host:port argument.

web [host:port]

Web Command

back

Go back from selected namespace or module.

clear

Clear terminal

exit

Exit interactive shell

Web

Most of the command line features are accessible with the Web interface.

Namespaces & Modules

It's easy to switch between namespaces and see details of modules.

Namespaces and Modules

Hardening

Just click run under the module properties for executing the hardening command.

Hardening

Adding Modules

There's a menu available in the web interface for adding new modules.

Adding Modules

System Monitor

It's possible to display various system information such as disk usage and network state at the Web interface.

System Monitor

Docker

Building the image

docker build -t graphenex .

Running the container

docker run --rm --name graphenex -p 8080:8080 --privileged graphenex

Screenshots

Screenshot I

Screenshot II

Screenshot III

Screenshot IV

Screenshot V

TODO(s)

  • Add new modules for Linux and Windows.

  • Add -w support to Docker image

Contributing

For contributing to this project, see CONTRIBUTING.md

Contributors ✨

Thanks goes to these wonderful people (emoji key):

orhun
orhun

💻 📖 📆 💬 🤔 👀
Faruk
Faruk

💻 🎨 📦 🤔 👀
EnesOkutan
EnesOkutan

💻 🤔 👀
Efe Aydın
Efe Aydın

💻 🤔 👀
ibanez75612
ibanez75612

💻 📦 👀
Emperor  Federico
Emperor Federico

💻
Taylan
Taylan

🚇
zero77
zero77

📖
Marc
Marc

🖋
Tan Siret G. AKINCI
Tan Siret G. AKINCI

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Sponsors

We don't have any sponsors yet. Contact us with email if you want to help us improve the project.

License

GNU General Public License v3.0 (gpl)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].